In Germany it is mandatory for a person renting a room in a hotel to register with some kind of ID (section 29 Bundesmeldegesetz). In addition, the number of relatives traveling with the person who rents the room has to be given. The law does not require these people to show their ID, and in most cases hotel clerks haven't asked the people I was sharing a room with to show theirs.
In other words: The likelihood that the hotel will not notice that you want to break your contract with them is not that high.