I think you might be mixing two different things here: contract type and job type.
Yes, sometimes companies have spikes in demand, for example a project that's delayed and they want to temporarily add some new people. Of course they will use contractors for that, and then those contractors will be let go. But that should be communicated clearly during your job interview, that the role is only temporary.
However, many companies seek people for a long term jobs, and B2B vs employment contract is simply the matter of tax optimization. I know contractors working for the same company for 10+ years. They are definitely not the first to be fired.