It's definitely the opportunity.
But, more and more there are plays where Williams looks a little better than a replacement RB with elite opportunity. Then when you consider Williams' pass-pro, it's the cherry on top. He's a good football player who checks each box his coach wants an RB to execute. He makes a clear impact on the Rams. Their offense with and without him is night and day.
He's going to be an interesting player to watch in the offseason. I think there may be an incentive to sell high, because he doesn't fit the conventional mold of a bellcow and he played so many snaps. I do think the Rams will add an RB, because they don't have good depth there.
However, I think there's also the possibility that Williams may be a Devonta Freeman or Austin Ekeler type of anomaly. McVay is an elite HC. His offense currently features and maximizes scheme-specific skills (Kupp, Nacua, Williams) from players you wouldn't have expected to be producing like they are. Even with less oppotunity, I don't think Williams is fading so quickly when he plays at the level he does. He's unexpectedly been a safety net at that position for them.