It's a bit more complicated than that.
There are some old posts discussing this (one, two) but essentially the row is kept in mdl_user but marked as deleted (i.e. the deleted column is set to 1), some information is lost at this point -- it's an unrecoverable operation.
User private files would be removed from Moodledata but course files are not. This includes assignment submissions to courses, these become invisible via Moodle but still take up space in Moodledata. They're not orphans though, under the hood there's still a link to the mdl_files entry from the course via the assignment. I think MDL-47265 covers this issue.
So yes mdl_files and Moodledata store individual files once and these are removed from Moodledata when the last reference is removed. But deleting users doesn't necessarily remove references to course activity files such as assignment submissions and these can still take up space (which is a little frustrating).