I was rated 1140 in rapid, playing against an 1145. Chess.com said 8 points were at stake, so a win for should put me at 1148 and my opponent at 1137. I won and my ELO did become 1148, but my opponent's became 967. What happened here? That's a 178 point swing, over 20x what it should have been.
Chess.com does not exactly use elo ratings. The system they use is glicko2. This involves a "ratings deviation" variable. If your RD is low, your rating is considered reliable. The result is that your rating won't change as much, but your opponent's rating will change more. Conversely, if your RD is high, then your rating is considered unreliable. So when you play, your rating will change more, but your opponent's rating will change less.
RD starts out at a high value and will lower as the system becomes more confident as to what your ability is. It will increase if you go a while without playing games, since your ability might have changed in the meantime.
So, the most likely explanation is that your RD is low, and your opponent's RD was high. RD doesn't seem to be displayed in your stats anymore like it used to be, but there is a way to check it if you're interested. Go to this page:
Replace "msoliver" with the username of the player you're interested in. It's not exactly a user-friendly page, but it does show the RD for all your ratings.
It also depends on the rating deviation of players.
Created an online glicko2 program where you can input your rating info and opponent's rating info. This can be used to approximate the changes in the rating after applying the results.