All the upper body work is spread out so your not workinng it 2 days back to back. There's also a decent amount of time between Deads and Squats.

And the reasons I would have chest the day before legs and not shoulders is becasue on chest days virtually no lower back is usually involve where as on shoulders alot of heavy standing exercises can be used and also holding a bar on your back for squats with DOMS in your traps and delts is no fun!