This warning is way old, much before the times of decentralized version control systems like Git. Back in those days, to hack core, you needed to keep your changes as a set of patches your own. Because some (mostly inexperienced developers fiddling with Wordpress) didn't do patches to keep track of their changes, they ran into a problem: In the end they had problems with updating Worpdress to the new version and the saying was born.
The warning was more or less a cultural side-reference to the "Every time you masturbate... God kills a kitten" image caption and obviously meant as fun. However, the analogy between "hacking wordpress core" and "masturbating" was brought up. This probably has led to quite some popularity.
Sure hacking core is a two-sided sword and I guess this is why you have asked.
First of all it is perfectly valid, possible and feasible both in past and present to hack core. In the past with patch-sets and even more easy today by using git and the git repo of Wordpress publicly available on Github.
Instead of telling users (who might not even understand what this is about) they are dumb by making jokes about them, it's better to encourage them and educate them.
Also, and this is one of the more dark sides in the Wordpress history, the Wordpress community does not promote here well. Even though it sort-of encourages users to bring changes upstream (that means into the original code-repository) which is a good thing normally, Wordpress didn't do for the libraries they have taken over into their tree from upstream sources. So keep these sayings lightly, it's nothing Wordpress lead and core developers did follow for the code they have been taken over from others as well.
So if you judge on the saying by looking at the developers hands, it's purely a joke, it's just a vulgar cultural reference.
The best suggestion I can give is if you're a developer and you want to make changes to core, do it. Do it in the way it pleases you not others. Wordpress is Free Software for a reason and you should be proud of it and what yourself is doing with it. Publicly or privately. If you're looking for ways to make this more feasible, create a workflow around it as you would also if you're doing other kind of development work.