It is strictly impossible for an airline to know for sure and in advance if you will be allowed into a country or even allowed to board.
While the general cases can be relatively easy, there are so many special cases and exceptions it’s not even funny, there’s a lot of information they don’t even have (like previous travel history), and authorities have discretionary power to reject anyone at the border, or for countries with bidirectional API (like the US), at time of boarding (the dreaded “DO NOT BOARD”).
Even without getting to that point, tools like Timatic have a few limited cases where they will say “no visa required” or “visa required”, and then tons of cases where they have long lists of conditions and exceptions and special cases which are not standardised enough that you can just enter data and get a verdict, you just get something a human must interpret (which is often not quite obvious), sometimes pages and pages long, and is sometimes subject to errors.
Add to that the fact that things change quite often, and you get a big mess, which airlines absolutely do not want to enter, as it could open them to a whole lot of liability. So they just stay clear and put the responsibility squarely on the shoulders of the passenger, and they honestly very little other choice.
Many airlines and OTAs will make it quite obvious and explicit at the time of purchase, but it is always spelled out in the terms and conditions.
lawstack exchange. In general you are responsible to be in line with laws (also if you do not know it). When you buy a ticket, usually there is a link to check visa requirements (usually on external site, because it is complex). In any case you should know better then an airline. If you want more, you should go to a travel agency.