A company can't just do profit. Profits aren't a thing that a company can choose (typically), they aren't an input, they're an output. You can't choose your outputs, you can only choose your inputs and aim them towards specific outputs.
How do you achieve profits? Well you do things that your customers want, and one of those things might be security. For some companies, the input of investment in security will result in the output of profits. For others it won't, or the two will be less correlated. If security does convert well into profits then it follows that it should be a priority input for the company, because that's how they will achieve profits.
This is still a huge generalisation, but perhaps less of one than "profit is the top priority".
https://archive.org/details/the-age-of-surveillance-capitali...
You are starting to discover what is called a "business model". For a good introduction, take a look at Osterwalders BMC.
https://www.strategyzer.com/business-models-the-toolkit-to-d...