Rest above a note in a piano piece

I am playing a piece and wondering, what the heck is the rest making there above the note?

The piece is in 3/4 so I see no purpose of the 1/4 rest.

I've been googling around but did not find any proper explanation. Most answer says that the piece has more then one voice. It obviously has but I still don't get it.

-
You have two voices there (signified by the different stem directions). One voice has a half and a quarter note, the other a quarter rest and a half note. – Joey Mar 6 '14 at 10:57
J. S. Bach, Notenbüchlein für Anna Magdalena Bach? – 11684 Dec 21 '14 at 13:30
Apparently, it isn't. Now I'm curious. What piece is this measure from? – 11684 Dec 21 '14 at 13:32
@11684 It is the Menuett in G major from Christian Petzold and you are actually right :), it was attributed to Bach, as it is located in BWV 114. It is the 25th verse(?) – Samuel Dec 21 '14 at 13:53

Let's look at what going in the bass clef. You are playing a B for beats 1 and 2 and then playing another B on beat 3, but you also play a D for beats 2 and 3 in the bass. Because you play the D on beats 2 and 3 and the B is also being played on beats 1 and 2, the rest is used to show you what beat to start playing the D. Without the rest in, the notation would tell you to play the B for beats 1 and 2 instead of 2 and 3. The rest is necessary to show where to play the D. It looks odd, but it's the best way to notate what is happening.

-
A way to think about this is that there are two voices on the bass clef: the lower plays 1/2 b, 1/4 b; the upper plays 1/4 rest, 1/2 d. The voices are distinguished by the directions of the note stems. – Dave Mar 5 '14 at 20:26
The description of what everything means is correct, but I don't think it's entirely accurate that "Without the rest it, the notation would tell you to play the B for beats 1 and 2 instead of 2 and 3. The rest in necessary to show where to play the D." I think it'd be more accurate to say that "the rest makes it explicit where the D should be played." If every implicit rest were included, much printed music would be much more crowded. – Joshua Taylor Mar 5 '14 at 21:13
In this case, the fact that the D half note in the bass clef aligns with the the G eighth note on beat two of the treble. Even if the quarter rest weren't marked, it'd be rather strange to notate the B and D half notes in the bass clef starting on the first beat in this way. That said, I don't think that including the quarter rest here is uncommon for piano music. In handbell music, though, where all players are reading from the same score, but are only responsible for a few bells, the rests (where a player needs to damp a bell) are very often left implicit. – Joshua Taylor Mar 5 '14 at 21:24

It's effectively written as three parts. The treble clef is one line. The bass notes with stems going down is the bass part, comprising B minim and another B crotchet. Then there's the 'middle line', played with the left hand.Obviously it's a D minim, stem up, but that leaves the first beat of this bar with nothing to play. Thus a crotchet rest. You can't mark a rest with an up stem or down stem !!

-

There are two separate "layers" of music occurring on the second staff. As you can see, the notes with downward stems already fill the bar, making 3 beats. The rest is part of the upper layer of notes, which begins with one beat of rest and continues with 2 beats on the D.

-