Question: do villagers need access to beds?
Answer: A villager requires LOS to their bed in order to determine if their bed was broken. Without LOS to the block the bed is at, they will not unclaim the bed. A villager can only lock onto a bed when they are within 50 blocks of a bed but will stay locked on to a bed within 100 blocks of it.