I saw quite a lot of games where the zerg player chose to upgrade his natural into a lair. Usually I transform my main to a lair, because I feel like it's better protected. What's the advantage in upgrading your natural expansion instead of the main?
Simple answer: more health for the opponent to work through when it gets attacked.
Longer answer: see above. :) That's really the only reason the expansion gets upgraded first. But it also is a little map dependent too. If they can only reach your base early in the game via the front (i.e. Xel'naga Caverns) you'd want it to have more health so that you can hold onto it a little easier (i.e. buy you more time for your army to get there to defend it). But if they can walk into your main from another route, then there really is no advantage and just a matter of where your army is.
I would add to Sorean's answer. This is also something to factor in for maps like the older version of Shakuras Plateau where there were destructible rocks into the back of your main, and a path connecting. When you had horizontal spawns, depending on some race matchups, it was likely the opponent would attack through that passage, and would take out your main with a big push. By making the lair at your natural, you don't lose that tech when your main is taken out, especially if you are in a late game macro situation where you are on 4+ bases.