When should you edit core WordPress files?
when there is no plugin available to make a customization you need
You should never edit WordPress core.
when you need to add a custom page template
when you need to add a custom script to the header or footer of every page in a site