A few centuries ago, scientists designed the periodic table to organize the elements we knew about in a way that was useful. Elements were grouped by similar properties on the horizontal and vertical. Somewhere down the line, more recently, someone decided to squeeze a different dataset into the same structure. It made very little sense, but it caught on. Maybe because it looked scientific and official. I don't know.