I really wonder why standard tuning of guitar is EADGBe.
Let's take this example,
every 5th fret on any string gives you the next note If you press 5th string on A string then you will get D. Similar pattern with 7th fret which gives you the previous string. For instance if you press 7th fret of A string then you will get low E.
But things change in B string.
I also noticed that this shifting is happening in scale patterns and furthermore.
So why do we still tune our second string to B? Wouldn't it be better to tune it to something like for example C?
I would like to know it with some historical aspect if there are and in context of music theory. (Like it changes the chord shapes etc.)