I think there's an important caveat about the assertion that potting soil should be changed every two years. Potting soil is a misnomer in that it doesn't actually contain any soil (which is why it's sometimes more accurately referred to as potting mix). Instead of soil, it's typically comprised of peat moss, composted bark, sand, and perlite or vermiculite. This means that unlike soil, it contains few if any nutrients, other than the synthetic granular fertilizer that is typically pre-mixed with it in the bag. With that in mind, there are really only two reasons I can think of to swap out potting soil after time.
One reason would be if you water your potted plants with synthetic water-soluble fertilizer. This could lead to a build-up of the salts that are used to manufacture synthetic fertilizers, which ironically can interfere with the plant's ability to take up nutrients. However, if your potting soil is of a good structure that drains well, and if you aren't over-fertilizing your plants, I think it could take a long time for salts to accumulate to the point where the soil needs replacing. But better yet, if you use an organic liquid fertilizer which isn't manufactured with synthetic salts (my favorite for roses is "Bill's Perfect Fertilizer"), then there's no need to replace the soil due to salt accumulation.
However, another reason to replace potting soil over time might be if the structure of the potting mix has decomposed to such an extent that it sort of "collapses" into a wet mush that doesn't drain well, leaving the roots waterlogged, in which case they could rot. But even if that's the case, one doesn't have to throw out the potting soil, but can rejuvenate it by mixing it with some fresh potting mix so that the structure becomes loose and aerated again.
In my own experience, almost all of my gardens are grown in-ground, with the exception of a small courtyard that is devoted to 25 or so potted plants, most of which are annuals. Because I live in New York, I have to empty the pots of their soil every fall so that the soil won't expand when frozen during the winter and crack the ceramic pots. I remove the annuals after the first hard freeze, and then dump the potting soil into a large bin for the winter. The next spring, I reuse the same potting soil to refill the pots and plant new annuals, and I've done this year after year with excellent results. I occasionally mix in some fresh peat moss to rejuvenate the structure of the mix and aerate it, but I never throw it out. In fact, I inevitably find that it is populated with earthworms and assume that is has developed into a healthy microbial environment that may well be better for plant health than the sterilized soil you get when you buy a new bag of potting mix.
So that's my take on it, and I'd be interested to know what others think.