This isn't accurate. These companies do make billions and billions in profit. And they do pay taxes. They shelter a lot of hose profits in licensing deals off shore though. so the effect is the same.
And yes, the stated goal of a for profit corporation is to increase value for the share holders, so there's that too.
But these aren't accounting problems. They are issues with regulations and shitty personal values/moral codes.