I'd formulate it so: If you pass a reference, you get a copy of that reference. So you have two references pointing at the same thing. If you overwrite the received ref with something else (a hashref in your first example), you only have one of the two references left and the var that held the second reference before now has a reference to the hashref.
Ordinary morality is for ordinary people. -- Aleister Crowley