Just about any aggressive cichlid mentioned that clamed territory beyond the confines of its tank.
My RD has an imagianry line about 8ft from his tank that once crossed gets him going. To prevent him from glass banging I'd need a tank about half the size of the room. I think he learned that banging the glass gets him attention, if you go over to the tank and start "playing" with him he doesn't hit the glass anymore (unless you put your face too close) just flairs and swims back and fourth then goes up to the corner and begs for food. Once you give him a couple of pellets, he'll get pissed again as if to say ok thanks, now go get lost.