You’re confusing federal income tax with federal taxes in general. Google pays significant federal taxes any time they grant out stock or pay cash to employees/execs via payroll taxes.
There isn’t a way to avoid the taxation when that excess profit leaves the company somehow to shareholders. Even buybacks that cause stock appreciation lead to significant fed revenue when people sell.
Google and Facebook are both multinational companies, employing people in many different countries. I guess there's probably a majority of their payroll expenses in the USA, but I have no idea.
There isn’t a way to avoid the taxation when that excess profit leaves the company somehow to shareholders. Even buybacks that cause stock appreciation lead to significant fed revenue when people sell.