Motels in the US can be extremely cheap, maybe $30/night. This makes a month comparable to a low-end apartment - but the advantage is that they are highly transient - as long as you've got $30, you've got a bed for the night. No contract, no lease, etc.
Moving into an apartment usually requires a month (or more) deposit, potentially a credit check and employment verification. There's a growing precariat in the US who cannot provide this, so motels provide a solution in a society that operates on free-market principles and has little social safety net.
"The Florida Project" is a good film that dives into this part of American society a little bit. As an immigrant who started out in this country near that run down part of the US-192 in Florida, it's spot on.