Don't understand why an arbitrary limitation should be added. In D&D the players get to decide if they want to push the envelop in regards to party resources. Maybe time is of the essence and they would rather press on than rest? Or maybe they got themselves into an area too dangerous to rest? Taking away player agency is never a good thing.

Also "Encounter" is a relative term. It could mean fighting enemies, but an encounter can also be a social encounter, a puzzle, some sort of survival/hunting skill check. The list goes on.