Note that this is for deposits of reasonable amounts. If you try to deposit more than $10,000, they do look at it harder.
As long as the depositor is not asking for cash back, they generally don't look at who is doing the deposit as long as the name on the check matches the name on the account.
Officially, the depositor needs to be on the account but I've only had one branch reject a deposit to my account by my girlfriend (who has a different last name) of my paycheck into my account.
As has been mentioned, "for deposit only" was in the endorsement section and none of the cashiers know what my signature looks like anyway. They just check to see that it is there. There are too many customers to know everyone's signature.
When I was a kid, my Dad almost got arrested for depositing his own paycheck because my Mom always deposited his checks and they didn't recognize his signature. I can't see that happening any more.