Its to get people in the PS ecosystem and get them into their exclusive franchises so they buy a PS5 to play the sequel's day one
I don't think this is it necessarily. If someone buys a PS5 for any sequels then that could be a good byproduct of porting to PC, though I'd argue the PC gamer buying a PS5 probably isn't a brilliant or profitable customer for Sony by buying a console, since most of their third party purchases are on PC and they're unlikely to buy subscriptions, which is where Sony makes its money.
This move is because they felt money was being left on the table. People who, despite Sony's strong lineup, still don't buy a PlayStation but a few years in the future run those games through an emulator (at best, buying and ripping a used copy) are literally an untapped market that isn't competitive to their console business.
Maybe seeing MS enjoy success on PC gave them the idea to pursue it too, but I doubt this is some competitive action against Microsoft.
I imagine they were looking at PC ports regardless, especially if they want to bring their games into cloud infrastructure. PS Now will be running off PC servers in the future and the highly scalable PC ports of their games will be running on those PCs.