Their distortion of public policy through lobbying is a bad thing, but their incentives are actually pretty understandable given the wacko market structure.
That doesn't explain why, if the market is regulated in such a way that PG&E is losing money serving customers to the point of near insolvency, they spend large amounts of money fighting the transfer of those money-losing customers to expansion of municipal utilities.
1. Pushing liability for disasters (natural and artificial) from the company onto customers and taxpayers.
2. Getting regulators to allow them to lower the safety margins on their infrastructure (a major cause behind the San Bruno explosion).
3. Fighting Community Choice Aggregation programs, which sound most similar to what you describe.
CCA programs are not as you described - they would not remove PG&E from the electricity market in cities. Rather, they allow cities to generate or purchase their own electricity and deliver it over PG&E grids. As I described, this takes away PG&E's major revenue stream (per-kWh rates) while leaving them with their fixed cost (grid maintenance).
No, I'm taking about campaign spending (lobbying was imprecise) against things like the recent move to expand SMUD service area into West Sacramento. (Not the only recent proposed public utility expansionart they've opposed, but the one I'm most familiar with.)
PG&E has expended large sums on lobbying, particularly against expansion of public power companies into areas PG&E currently serves.
Presumably your friend would explain this has PG&E charitably protecting it's opportunity to lose money, but I think that doesn't quite reflect the reality.