It has not been that easy, in my experience.
Apple did not sell an unlocked iPhone 6 until last month, and I think they may have done the same locked-only-for-a-few-months thing with the 5s. I don't recall seeing earlier iPhones for sale unlocked at all, you had to do something illegal to them up till surprisingly recently -- maybe the 4, not sure?
I think the legislation is responsible for the easier access these days; I've wanted to buy unlocked phones since 2005, but haven't really been able to until this year.