I think you misunderstand/miscategorize what sci-fi/fantasy is. Also, no one in the bookselling business cares. Categorization makes so many things easier.
Sci-fi has been social commentary from the very beginning though. The Time Machine is much more about the class system than it is about actual time travel for instance. Setting things slightly outside of everyday society allows for much more exploration with what the ideas actually mean and doesn’t get as mired in everyday politics.