It’s often described that way, but tacking doesn’t really let you sail directly into the wind.
Instead you combine two vectors which on net result in the ship moving in the direction you want on average. But, with noticeable limitations if you also want to avoid obstacles etc.
That applies to any sailing ship, whether it is manned by pirates or not, of course.