Here's another way to look at it. The bonus when you attack is determined by levels in Zues, Aachen, and Castel del Monte. If you read those GBs carefully it says that those bonuses are when attacking. Those bonuses apply to your troops' attack and defense when you are attacking. More specifically, you get +5% per level of GB on both troops' attack and defense when attacking.
The bonus when you are attacked is determined by the monastery, any watchfires you may have, levels in Deal Castle GB and levels in Saint Basil's Cathedral GB. If you read those carefully it will say that you get the bonus while defending, and only on troops' defense while defending. More specifically, monasteries can give +20%, each watchfire gives +4%, and each level in those two GBs can give +10% to troops' defense while defending. If you do not have levels in these two GBs and you do not have any watchfires but you do have a monastery you will get +20% to defending troops' defense, and no bonus to their attack ever.
There is an occasional graphical glitch in the unit selection screen where bonuses do not display properly. When you actually attack someone, or when you look at the video of your units' defending your territory when you get attacked you can hover over the units and see the actual bonus. This display is not glitchy.