Interesting idea!
They wouldn't even necessarily need to rent out the private rooms (which would have higher housekeeping costs, and later check-ins, if they were dual-purposed as work areas) but maybe just a lobby-like or breakfast space or two. That helps the community too, so everyone's not just tucked away in their own little rooms.
However, probably a lot of small indie hotel locations are franchisees with some access to capital but probably limited participation in techie/hipster/young nomad circles (which is mostly what I see in coworking spaces). Usually those small local hotels, in my experience at least, are family-run and maybe not equipped to deal with either the infrastructure side (they almost all have shitty wifi, as a rule) or the customer service side (a constant stream of of people going in and out, not just during check-in and checkout... but then again, that is their bread and butter, so maybe?).
In my recent travels I did come across a cool outdoorsy chain though with more modern attitudes (repurposing old motels into fun community stays with regular rooms, hostel beds, camper van spaces, shared cafes and kitchens, etc.): https://www.logecamps.com/home Something like that could probably easily pivot, but then again, that's often a different demographic than the typical coworking space user. I dunno. These days they're all kinda blending together though :)
Still, all in all a cool idea. Wish I had the capital to start something like that!