Many of these positions are "soft money" positions - that is, they depend on grants. Since grants are temporary, the jobs they fund are also somewhat temporary. That said, this doesn't tell the whole story since temporary positions typically have a shorter term (for example, a year) than the grants that fund them.
For post-docs, it's a bit different. Post-docs are officially "training" positions - they are meant to be a step in the development of a scientist, a stepping stone towards more independence. Both employers (that is, universities) and funding agencies often have limits on how many years someone can be considered a "post-doc" because the idea is that this training should be temporary.
You could argue that the grad student to post-doc to professor track follows the apprentice/journeyman/master structure in the trades (I'm not certain whether it was explicitly inherited/motivated from that system, though).
Comparing academic to industry jobs in the US, while there are certainly differences in the hiring schemes I'm not sure they're actually all that different. "Permanent" jobs come to an end all the time as employers go through cycles of growth and layoffs. In most (probably all?) US states it is far easier to end someone's employment than it is in other countries like the UK or Germany.