First, I agree that a residence shouldn't be treated as an investment. It's actually for that reason that I think your primary residence should to some extent at least be exempt from capital gains. Here's why:
I bought my house for $85,000 in 1998. According to Zillow, it's now worth something like $170,000. I can sell it and I've made $85,000 right?
Not really.
I still need somewhere to live. If I buy an equivalent house in the same area, it's going to cost me...$170,000. I haven't really gained anything.
Yes, I can put that (and additional money) towards a nicer house, but I can't actually buy a nicer house with the proceeds of the sale, so that doesn't actually increase my bottom line.
Now, I could downsize. Buy a smaller house with the proceeds of the sale and put the remainder in my bank account. If I had bought a smaller house to begin with and saved the excess money I might or might not have ended in the same place depending on the real estate market at the time of purchase and of sale.
So it makes sense to me that proceeds that are then applied to purchasing another residence should be exempt. It's probably simpler to just set a dollar limit.
Note that this exemption only applies to your primary residence, can only be taken once every two years, and you must have occupied the house 24 months of the past five years. Which means it doesn't apply to flippers or landlords, although there is a way to game that last one.