True, but it was also technically completely within the rules of the game, based on already established rules for creatures and the feats that the character had chosen.
A DM ruling that the bag of rats trick wouldn't work "would be changing the way the world works", "applying different rules based on the motives of the character" and similar criticisms that we have seen already levelled against such a hypothetical DM in this thread.
I think that the majority of people in the thread would agree that this hypothetical situation is an exploit, and that it is part of the duties of the DM to rein in that sort of thing before it disrupts the game too much.
So they have to make a ruling that changes existing rules mid-campaign, and which applies based upon the motives of the player.
Where each DM draws that line between "legitimate application of the rules" and "immersion-shattering exploit" is going to vary.
When a character throws themselves off a cliff, DMs are going to make a judgement call. Some DMs are going to check if the character does anything to mitigate the fall, like trying to catch themselves or aiming for a soft-looking rock. If they don't, the DM might rule that HP damage is not the best reflection of that situation. The concept that HP can represent luck, divine favour, and survival instincts has long been part of D&D, making this a perfectly legitimate ruling by the DM.
Other DMs might just apply the standard falling rules irrespective of the intentions of the character and simply apply the standard number of d6 in HP damage, possibly modified by the surface that they are falling onto. - This is also a perfectly legitimate ruling by the DM.