How did the dorms get assigned their names?
The academy was created by Seto Kaiba who first owned Obelisk while Yugi owned Slifer. We can infer from Kaiba's personality that Kaiba always wants to be better than Yugi, so he placed the rank of Obelisk the highest and Slifer the lowest.

For Ra, the card was originally owned by Marik, and the only spot left the rank could be placed is in the between the ranks of Obelisk and Slifer.