In pre-internet days it was simple - you turned up somewhere and looked around for somewhere to stay. Booking ahead was impossible, and even after it became possible tended to cost more. In Peru my system was to ask directions for the Placa de Armas, the name of every central square in Peru, and look around for a cheap hotel, of which there were many.
Now that booking ahead is the norm we have a dilemma -it saves the mess of trying to find a room after a hard ride, but locks you into your itinerary. On bike rides weather, bad roads, punctures and flights of fancy all throw plans off course. With data, you can book online when you arrive, but this rules out guesthouses - if the host isn't expecting anyone they'll be out doing something and won't have a room made up (I once had to wait patiently for a family to kick the mother in law out of bed before so I could have her bed).
Today I didn't know where I would finish so I didn't book. I've ended up in the only real hotel in town and it's very nice. Cost a little more than the guesthouse, but as they don't have to pay the booking.com fees I got it a few quid cheaper than the online price. Nice.