Got caught by this as well - was actually scolded by the bartender in an Irish-themed pub in NY for not tipping after the third or fourth round. My group literally had no idea that this was a thing.
I don't think I've ever seen a "advice for visiting the US" video, page, or pamphlet that didn't include tipping. The only way you couldn't know is if you did zero research before traveling to a foreign country. That's like not knowing you can't jokingly yell "Heil Hitler!" in Germany.
It is not that simple. There are no clear rules on where you tip. You have to live in the area and simply learn it. E.g. you don’t tip at Starbucks, but you do tip at most cafés, you tip you taxi driver but not your bus driver. You don’t tip at the gas station. In an open bar you are still supposed to tip the bartender even if you don’t pay for the drinks, but hardly any guides tell you that. If there is live music sometimes you are supposed to tip them, but you can never tell when.
I've lived in the US all my life and am still confused about when tips are expected and part of the wage structure. Sit-down restaurants with an assigned waiter are the easy part, it's all the other cases that quickly become confusing.
It's not helped by the fact that every order-at-the-counter restaurant now asks for tips as you pay. It's almost to the point where I assume that a tip is needed if and only if I'm not asked for one. No wonder it's confusing to visitors.