Google absolutely shares that information with other firms:
Are you absolutely sure about that? Are you absolutely sure it will remain that way tomorrow, or next month?
This is exactly my point is it is clear you are consenting and have control and can opt out here: https://adssettings.google.com/. I am very aware of real-time bidding for ads works.
Also you shouldn't assume gender.
If you want to distract from the discussion at hand by making it about gender then that's on you.
As for 'consenting' and 'opting out' that's not how it should work, you don't 'consent' to being tracked by Google because you didn't opt out, that's Google assuming your consent (which, to tie it in with the previous bit is a lot more serious than assuming someone's gender).
They exist because of and for targeted advertising, everything else is just a means of getting there.
"Within company" is a meaningless distinction. It requires the assumption that Facebook or Google themselves are trustworthy, and smaller companies are not. But the big players themselves, are in fact, not trustworthy. So whether or not they sell the data or abuse it in-house is pretty much irrelevant.