I average about 20 finished books a year. If this trend continues, I'll probably read close to 1200 books in my entire life. Of course – life happens and we don't always get to devote that much time to reading, so that's a generous estimate. Recognizing my own limited lifelong book count, I've become somewhat ruthless. When I find a book that I'm not enjoying, I simply stop reading it.
The time you've already sunk into a bad book is called sunk cost in economics – the costs that are already incurred but can't be recovered. As rational readers, we should stop reading a bad book. The sunk cost fallacy kicks in when we have the tendency to ignore rationality and finish the book simply because we already spent a few hours reading it.
It's not just for reading. I've been writing daily for almost 6 months now, and I hate to scrape a bad idea I've started on – but I do. In the end, I read more enjoyable books and write on better topics. There's no time to read bad books.