Hosts state a cancellation policy and decide the time frame therein to cover risks and inconvenience.
Previous hosts of mine have tightened their cancellation time frame from, for example, a week, to a month (without my having had anything to do with this).
The security net for the host is, analogous to a deposit for a landlord, is the cancellation policy. If they think they will have any difficulty finding a new guest, they will and they do change their policy to reflect that concern.
Because of travel revenge, it's become necessary in many cases for guests to book at least half a year in advance, especially for the "star" hosts.
A lot can happen within half a year. Plans change for many different reasons.
I will be going to Italy in a month. The apartment I'll be staying in for three weeks I found through booking.com, which has no limitation on cancellations. The financial penalty of canceling at the last minute, or even weeks before, is sufficient, apparently.
I have had hosts cancel on me, for various reasons, one of which is that they decide they want only a six-month rental rather than the 7 or 10 days I had reserved with them.
On another platform, the host had "made a mistake" and, so she said, had someone already booked for the apartment. She wrote me this on the day before I was to arrive at her place. I had to scramble to find a place to stay.
It is the ratio of cancelled bookings to actual trips taken (or places stayed at) that is relevant. A guest who travels 4-6 times a year is going to rack up more cancellations than a guest who travels only once a year.
It is a competitive situation for both hosts and guests. I usually book with a host that has around a 4.6 star rating or above. Star hosts seem to never have trouble finding customers, as I've almost always noted in the week or two after a past cancellation. Their places are snapped up really quickly (San Francisco, Paris, among others, are places I go to frequently).