In German we sharply distinguish between places and directions. For places we use dative case, for directions accusative case.
Und der Teppich liegt hier links, an der Seite.
And the carpet is here on the left, on the side.
»on the side« is a place, so you have to use dative case in German.
And the little things ... we put them to the side.
And the little things ... we put them to the side.
»to the side« is a direction, so you have to use accusative case in German.
Another point is, that for some situations we not only just use different cases but even different verbs. These pairs are:
directional verb - verb of location
- legen - liegen
- stellen - stehen
- setzen - sitzen
- hängen - hängen
That hängen also belongs here will become obvious in the following examples.
Here are examples:
The directional verb is shown in 1 and 2. The verb of location in 3 and 4.
The sentence with the number 3 is the result of the sentence #1 and #4 is the result of #2.
In sentence #1 the directional verb is used transitive, in #2 recursive. The verb of location is always an intransitive verb, so it must be used intransitive in both, 3 and 4.
Another difference is that the directional verb is inflected regularly (legen - legte - gelegt; hängen - hängte - gehängt) while the verb of location is irregular (liegen - lag - gelegen; hängen - hing - gehangen)