Both are good and will work well. The first routine that you mention...the triceps are used as secondary muscles when you first work the chest and get a good warm up to proceed to training them. Same goes for the back/bi routines.
The second listed routine also works well. I'm not going to get all technical but one good reason to change it up from the first to the second is to confuse the muscles from not being in the same routine week after week. I'd start off with the first routine and then switch to the second routine when you may be noticing a plateau.
A note on shoulders which is very evident if you check out a lot of people's shoulder development in the gym. many fail to work the rear delt and most over train the front delt. The front delt gets a lot of use from many other pushing exercises and often one does to train shoulders they still continue to train their front delts which leads to an unbalanced looking delt. Place priority first on the rear delts.