When developing a website or web application that is utilizing a base framework or system, it is very frowned upon to do any modifications to to the core system. In the case of Drupal, just like any other open source project, it is actively developed and released to the public in versions which adds new features, along with bug and security fixes. The issue of "hacking core" goes beyond just the core of a system but also to any of the possible add-ons that are developed by a third party. In the case of Drupal these can be modules or themes.
Even though it is not recommended and developers try to avoid "hacking core", there are times it just has to be done to get the functionality required to work. Great, you got the feature you needed working now. But what about a year from now, or even just 2 months, when a whole bunch of new release are out for the core and add-ons you used and hacked. Well, for Drupal, there is a module to help you with updates. The Hacked! module will compare your Drupal core, modules, and themes with the original files based off the version that is reported. Hacked! does this by generating sha1 hashes of each file and comparing them. If they are different, it warns you about it. Additionally, the Hacked! module can display a difference report of each file if you have installed the Diff module.
With these modules, preforming updates to your Drupal site become easier to identify and reapply any hacked changes. You can also use source control (Git, SVN, etc) to help identify these hacked changes as well, so there isn't just one solution to this problem.