There are two reasons why it is better to add to secondary vs. primary
1) During primary fermentation, the biological processes are much more active leading to large krausen (think head) levels which could life up any fruits/hops/spices and clog up an airlock or blow off hose
2) Along the same line, because fermentation in primary is so much more vigorous, more CO2 is being let off. This can also "blow off" a lot of the hop/spice/fruit aroma that is so desirable.
As far as adding before bottling, the only time I ever really hear about that is for using flavor extracts. They tend to be a little more volatile and will fade with time, so it is sometimes best to use them as late in the process and as close to drinking as possible.
Hope this help,s welcome to the board.