Should I include a research in my thesis which does not have a direct connection to its title?
In many cases, it comes down to your defense and the work you've done, and the thesis is a document for you. You can include, or not include whatever work you want.

I'm speaking from a PhD in the natural sciences in the US, different countries and subjects have different rules and guidelines.