Because that's what they named the buttons when they made the first controllers years ago.
Atari 2600 only had one button, so they never named it.Â
Nintendo had two action buttons, and named them A and B.Â
Sega decided to put a third button, in a line with the other two, and named it C.Â
Now, both the Genesis and the NES had controllers with extra fire buttons for various purposes. NES generally went with Turbo-A and Turbo-B, but Genesis's 6-button controller went with X, Y, and Z.Â
So, now we have the precedent. So, when Nintendo made the SNES, they made the new controller with A and B on the bottom row, and X and Y on the top (angled toward the player's right hand). Because they wanted the A button to be the primary action button, it was placed to the rightmost spot, leaving the B in the bottom.Â
And then Sony comes in and bucks the whole trend, by using shapes. The Triangle represented a field of view and was meant for camera functions in games. The Square represents a menu. And the Circle and Cross represent a right and wrong answer, or Yes and No.Â