There are currently 4 countries that are in the EU free market but not in the EU (Iceland, Liechtenstein, Norway and Switzerland) all trading without hindrance from any of the other countries - what is to prevent the UK doing this as well.
Nothing at all, but this boils down to the question of what is better for the UK: to stay as a member of the EU, or to leave and become a member of the EEA instead.
Within the EU, at least we have a vote and are able to heavily influence EU legislation due to our large population giving us strong leverage in the EU legislation process. Without that, we would still have to contribute to the EU budget, still have to abide by most of the EU laws, and still have to allow the free movement of goods and people (just as the countries you mentioned do), except we would no longer have a say in the legislation we have to abide by.
For Brexit supporters who claim we should "take back control of our country", I find that scenario a little odd.
As I mentioned before we are a large economy that most of the other EU countries will want to continue to do business with. What would happen to Germany's car sector if it didnt have access to the UK market? (They sale a lot of VW's. Merc's, BMW's etc in to the UK). France sells a lot of food in to the UK so what would happen to their agricultural sectors? What about things like Airbus and other joint projects - Will the other EU countries want to see those deals collapse.
For any sort of retaliatory action to taken by the EU I believe a completely unanimous vote would be needed with a single veto vote sending the idea out of the door. For France or Germany to agree to take action they would be signing up for economic loss and possibly large job losses in their own countries. That is just two sectors from two countries.
Retaliatory action is not necessarily something so transparent and obvious. Of course they won't try to pass decisions which are there with the intention of being detrimental to the UK. However, right now, the EU has the UK only in its best interests as a member and major EU economy. If we leave, that's suddenly no longer the case.
Conflicts will start to appear. Whilst the EU benefits overall from a stronger UK, the UK will also essentially become a trade competitor. To retain the cohesion of the EU, they also can't be seen to be giving favourable treatment to the UK over its own members. To be a member of something and contribute in certain ways, there has to be rewards. What message does it send to other EU nations if someone can leave and retain all the same rewards as members within the EU?
Don't get me wrong, it certainly leaves the EU in between a rock and a hard place. No path is without its downfalls, but the fact remains that the UK becoming a case study of heightened growth and prosperity after leaving is ultimately not good for the EU's self-preservation.
Of course we will be able to negotiate deals as many countries do depend on trade with us, but the question is whether such deals will be as open and effective as they are now. They will play hard-ball, as what's best for the UK, and what's best for the EU, will no longer be one and the same in many respects.
Sure, there's the EEA, but it's a similar situation now except with no say whatsoever in the legislation we have to abide by.
And all of this trade-off and economic uncertainty which inevitably scares away investment is for what, exactly? As members of the EU we currently have around 30 FTAs in force with other nations, around 20 more have been provisionally applied, and almost 30 more have been finalised and will come into force soon from around the world. We are a part of all of them.
This is all with the EU's massive bargaining power compared to our own individually. What exactly is the UK so desperate to do which we currently can't do in the UK which makes the economic impact of leaving worth the hit?