Deadlift and squat both work your hamstrings. Your hamstrings don't just curl your heel up to your butt, but they also play a role in bending you backward at the hips. You might think that because when you squat and deadlift, you're standing up against a weight, that it's only your quads being worked (and your quads definately get worked), but your hamstrings also fire as well, just like they do when you do stiff legged deadlifts.
In fact, this phenomenon is called some paradox (I can't remember the name... the ______ paradox), because antagonist muscles do not usually fire together. But, for example, when you are sitting in a chair and then you stand up, both your hamstrings and your quads are working. Don't believe me, put your hand on your quad and stand up. Feel it contract? Now put your hand on your hamstring and sit up. Feel it contract? Weird, huh. The same thing happens when you're walking up stairs.
But note that this only occurs with quads/hamstrings. Doing biceps curls, for example, does not cause the triceps to fire.
edit - From
Wikipedia