It is typical to need to give a place of residence when entering a country (even if you are on a travel visa.) Immigration departments will reach out to these places of residence if they are concerned of someone overstaying their visa. The B&B or hotel will show them the copy of the Visa stamped in the passport and their check in and check out time they are in the clear.
Specifically in the case of Italy it seems like it is to be compliant with long standing legislation called TULPS.[1]
1.https://www.quora.com/Are-hotels-in-Italy-required-to-take-a...