I think Porygon was created by Team Rocket, at least in the games' canon. In the originals, it's exclusively available from the Game Corner, which is run by Team Rocket, and according to some memo in Silph Co., it was created by Pokémon Labs, which I believe refers to the labs on Cinnabar Island also responsible for Mewtwo. Now this is where it's a bit of a stretch, since it's only in the anime and manga that Team Rocket is specifically said to have had a hand in Mewtwo's creation, and in the former, we already know that Porygon wasn't created by Team Rocket. Also, the only people who ever use Porygon in-game are Scientist Gideon in FR/LG, who was part of Team Rocket, that one Scientist in the Radio Tower, also part of Team Rocket... oh, and that one Super Nerd that ambushed you after the Nugget Bridge challenge in G/S/C/HG/SS. Admittedly probably not part of Team Rocket, but considering his willingness to wait until you were weakened before challenging you, he definitely seems like the type to be affiliated with them.
Of course, the Up-Grade was developed by Silph Co., this we know. My thinking is that they got ahold of Porygon, and realized they could do better than Team Rocket did, and from there developed the Up-Grade, thus giving us Porygon2. Now, an Up-Grade can be found in the Team Rocket Warehouse in the Sevii Islands, right? Well, my thinking is, Team Rocket found out about the Up-Grade, and were outraged. Probably interpreted it as Silph implying that they're better than Team Rocket or something. So, they took an Up-Grade, studied it, and from it developed a new, unapproved patch for Porygon that would deliberately glitch the system, intended to sabotage any Porygon improved by Silph's Up-Grade, thus giving us the Dubious Disc, and by extension, Porygon-Z.
I know it's not a particularly strong theory, but parts of it do make sense, right?