the reason that you might work quads and hams together is because the hams will get worked indirectly when you work your quads, e.g. squats.
is it necessary to work them together? for a beginner I would probably say yes, for someone more advanced I say no.
Another example is chest & tri's, and even shoulders. the same thing happens when you work chest, e.g. bench press you will also be working your tri's and shoulders.