system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why is the Periodic Table shaped the way it is?

I have basic knowledge of chemistry, but I've never received a straight answer on this.
gpt
To assemble the table: 

* Line up all the elements according to the number of protons in their nucleus (hydrogen 1, helium 2, and so on).
* Noble gasses stand out because they're chemically inert (I'll get to why later). Take this long line and split it at every noble gas to make a new row, keeping the noble gas on the right edge.
* You'll end up with some elements above others with different chemical properties. For example sodium would be above copper when it is much more similar to potassium. Introduce gaps so the chemical properties match vertically and you'll end up with the periodic table.

If you're ok with this explanation the rest is just chemical detail and tl;dr.

*Why* it behaves like this is because of electrons. Noble gasses have complete electron shells and therefore are inert. The first column has one electron in its outermost electron shell, and is therefore very reactive, the s shell can hold two electrons so that explains column 2.

The transition metals (centre of the table) are filling up the d electron orbitals, the first d shell isn't filled until after the 4th s shell (4s), that's why they don't appear until the 4th row of the table; the d shell can hold 10 electrons so the gap is 10 elements wide.

The elements on the right hand side have full (or missing) d shells and will fill up their p shell, which can hold 6 electrons but isn't used until after the 2s shell is full, which is why hydrogen and helium stick out the top of the table.

The block at the bottom of the table can also be visualised as slotting in between columns 2 and 3 of the main table. These elements are filling their f electron shell, which isn't done until after the 6s shell is full.

Why are shells filled in this order? Because putting an electron into the 5f shell takes a lot more energy than putting it in the 2s shell, electrons will fill shells from the lowest energy up.

EDIT: Formatting

EDIT2: There are other forms of the table that don't have gaping holes in the top, you can find them on Wikipedia.