This is different from a linear layout like a traditional piano. Note above that the D major triad has an F# which means it is played on one of the piano's black keys, while the C major triad does not have a sharp, which means it is played entirely on the white keys. You have to keep track of which particular chord you are playing in order to know whether you need a black key or a white key. This means the shape you play to get each major triad is different, so a traditional piano is not an isomorphic ("same shape") layout.
Guitars are also isomorphic (when all the strings being played are fretted) and may be easier to think about. If you imagine fretting the lowest two strings at the 5th fret and playing them both, and then moving your finger up one fret on both strings, the interval between each of those two groupings of notes is the same - you've moved them each up one step, but the difference between them stays the same based on however the strings are tuned. Similar to this keyboard, on a guitar you can learn the shape of a (fully fretted) major triad, and then move that shape anywhere on the neck to play any major triad.
Accordion bass buttons work the same way. Looks confusing if you don't have any idea what's going on, but it's actually very intuitive and easy to learn and play.