HTML comment cause issue in functions.php script root

The functions.php is loaded before WordPress has sent the HTTP response headers. If you have raw HTML content in that file, even a HTML comment, then that will be sent immediately, triggering PHP’s built-in HTTP headers.

Now, WordPress doesn’t know about this and tries to send the headers as usual. And that will cause an error message like “Headers already sent …”. This message comes with information about the file and line that created the first output, so it’s rather easy to debug.

Long story short: Don’t create raw output in the functions.php, use template files for that.