This is actually not always reliable, many larger institutions are able to re-enable the DD and continue charging you. I had this with my council tax after I moved out and cancelled it from my end. There are many complaints about the same behaviour from phone companies, insurance companies, and others.
Fitness First did this to me, probably a genuine error their side that they didn't cancel my account properly but I'd cancelled the DD with my bank and it re-appeared. I contacted the bank about it and they offered to put a lock on my account so I have to be contacted about any future Direct Debits which seems like it should be the default.
If I cancelled without formally ending our contract (with their demanded appointment in order to cancel)... they would have dinged my credit score with a complaint of non-payment for an agreed upon contract.
Not only that but any mistaken withdrawal is refunded.