Your thinking is backwards here. It's not that the music is written like this because it is played on a guitar, it is the guitar that was created to make simple music easy to play.
This is the reason why the guitar strings have the tuning they have, and not any of the million other possible combinations.
This is the reason why the guitar strings have the tuning they have, and not any of the million other possible combinations.