Every time you go the the gym, it makes sense to try to get the maximum results in the least amount of time. If you go to the gym for typically an hour, then it would be wise to perform the exercises that would give you the best results ultimately and in an order that would allow you to lift the most amount of weight, thereby doing the most amount of work and getting the best results.
When I say that you should organize your lifting session in a logical order, I mean to arrange the exercises in such a way that you minimize the negative effects that the previous exercises have on future exercises.
For example, you would not want to place tricep extension before bench press, especially if you go till failure on your tricep extension sets. This is because you will start out your bench press sets with some muscle pre-exhausted, thereby limiting the amount of work you will be able to perform on the bench. If your triceps are already exhausted, then you might only be able to get 7 reps for some weight when you would have otherwise been able to get 9 or 10 reps for the same weight. By not being able to perform as many reps, and thus not able to do as much “work”, you are sort of limiting your growth for the other muscle groups. If your pecs would have been able to pump out 10 reps on the bench press for that weight, but now because of your triceps you can only get 7 reps, then you really were not able to fully work your pecs.
This problem of having some muscles pre-exhausted can be avoided entirely. If you structure your workout so that you have all of the compound exercises in the beginning and the isolation exercises at the end, then you will be able to get the maximum amount of work out of every set.
For example, a good way to structure a pec/tri/shoulder day would be:
Bench > Incline Bench > Dips > Military Press > Tricep Extensions > Lateral Raises.
The first four exercises are all complex and involve many muscle groups, while the latter two exercises are pure isolation exercises, but since there are no complex exercises afterward, performing them at the end will not have any un-balancing effects.
Also, I like to structure my exercises in such a way that certain weaker muscles get somewhat of a break, or as much as possible. For example, I put dips in between incline and military so that my shoulders would be able to get a little bit longer of a break and be more fresh for military after incline, since they are somewhat similar.
In general, when you are planning the structure of your workout, you organize every exercise in such a way that you will be able to perform that exercise with the most amount weight and the most reps so that you get the most out of it. Obviously, the main limitation here is time, as having a 15 minute break in between each exercise would allow you to hit every set with the most amount of “work”, but this is not practical. So, keeping your workouts to 1-1.5 hours, organize the exercises so that certain smaller muscles will get as many breaks as they can, while also making sure not to pre-exhaust any certain muscle group before a compound lift.
As a side note: Pre-exhausting a muscle group can actually be a good thing in certain cases, and you might see some advanced bodybuilders using this technique to focus more on some muscle group than others. However, in general you should try to maximize the amount of work you perform in each set, and pre-exhausting a muscle group contradicts this. Unless you are advanced and know what you are doing and why, it is normally not a good idea to pre-exhaust any muscle group early on in the lifting session.