Yes, but sales and marketing has a positive ROI. If you spend $100M on sales and marketing, you'll get $150M back (for example). Otherwise, why would you do it?
So if pharma companies cut out all of their sales and marketing, they'd have even less revenue than they do today. And that would lower R&D spend.