This is actually not true at all. The cost here isn't in the filing of the patents; it's in the nightmarish patent system that results in absurd litigation and related expenses. If the patent system were reformed to avoid this kind of expense, the company would have lower operating costs, which would be distributed in some way. While it's possible I suppose that 100% of those savings would be collected by shareholders as profit, it's much more likely that, like with anything else, the cost reductions would simply contribute to the size of the total pie, which would be split among owners and employees in proportions probably roughly similar to how it's split today.