What would happen if I patented "left pad" in a bunch of languages?
Copyright protects the What (tangible creative works, such as, printed publications, movies, sound recordings, source code, and so on)
Trademark protects the Who (who made this service or product)
Patent protects the How (how does this widget do what is does)
IF cost_of_settlement < cost_of_court_action THEN pay_up(); /* ? */
Patents on software are not that simple - it needs to describe an entire physical system that gives value to a user, not just an abstract function that does computation.