From his wiki
That's why they traded him, and after the trade Stafford had a great season, taking the Rams to SB and Goff had a terrible season in Detroit. How someone can look at them and think they are equal is interesting. Goff oversaw further improved fortunes for the Rams in 2018, which saw the team reach Super Bowl LIII, the franchise's first Super Bowl appearance since 2001. He also received Pro Bowl honors in both seasons. Amid a production dip during his next two years, Goff was traded to the Lions in 2021.[2][3]