Weird. He was 10/15 with 1 TD in his second to last preseason game against Las Vegas. I saw his Las Vegas game on the YouTube and the offensive line was a sieve. Many times they were in the backfield before he could get through his first progression. In his last preseason game against the Broncos, there's a video of someone saying he looked poised. I watched that video and he looked far from "horrible". Of course, there were plays he didn't look good because the defense will make plays and he's also primarily playing with second and third stringers. I watched both of these games a while ago.
So again, it appears that "holy crap was he bad" is just your opinion.
Also, like I said, if the 49ers found their young QB who they think can be the long term starter and franchise QB, they're not going to spend time developing another guy anymore despite how much they traded for him, considering how green he was. That is a judgement call, and that is why Sam Darnold was brought in and also why he no longer is on the 49ers. He was there just to serve as an experienced backup for Purdy. And that rendered Trey to 3rd string where he didn't want to be and that's why he requested to be traded.