For example, to connect their system to the internet, that'll be $20/mo. I'd guess GM gets a large portion of that revenue. If you're using CarPlay, there's no reason for you to buy their service.
It looks like GM makes around $1,000 in profit per vehicle. If half of their customers give them $20/mo for a decade, that's $1,200 in additional revenue. If AT&T takes half of that, it's still $600 which is a solid boost to their profits.
Now, you might say that fewer people would buy their cars and I'd agree - but companies make short sighted plays all the time that backfire. Someone does the kind of back of the envelope math that I did above and says "omg, I can increase our profits by 60% with this one easy trick" and it's wrong because the world doesn't work like that, but you put together some consultants and consumer surveys that are favorable and you get the green light.
I know: GM is just killing their relationship with consumers. I agree with you. But think about what Unity did to their developers. Unity saw the chance to charge a fee every time a game was installed and all the money that would bring - and didn't think about the predictable developer backlash. Companies do these types of things.