There is no right or wrong its about the context of your program. If you are training for just strength then you should do it towards the beginning, but if you doing it for development then it can and should be placed at different positions in the workout.
To properly develope a muscle its not all about how much you lift, but how much stress the muscle is under. Obviously if you do deadlifts towards the end of the workout the weight will be less but that doesn't mean its any less effective. Just maintain proper form and don't go to failure. Its a n excuse when someone says they are more likely to get injured. That has nothing to do with at what point you do the lift thats about training with your ego and letting form go to sh*t.
Too many people get caught up in just adding weight to the bar to progress, but that has a ceiling effect. Learn how to work the muscle harder and more effciently and getting it to work on every set of every rep and not just move the weight from point A to point B.