Sounds like you've just run into a statistical unlikelihood is all and yes there is "punishment" for abandoning games.
A few things happen:
If you abandon games too often, then you are placed into a "poor sports" player pool with other people who commonly leave games as well. The default player pool is your "good sports" player pool. The statistical details on who gets into what category are secret and there is no way to view which player pool you are in.
Additionally, if you abandon games too often, then you may be sent a warning and eventually repeated abandonment might lead to other measures (banning being one of the most severe measures and unlikely to happen just for a few game abandonments).
I don't know how much "too often" is for abandonments, but I suspect that in 90 days of "good sport" behavior (i.e. abandoning less, or none at all), will "reset" you into the default good sports player pool.
I also think that abandonment may count towards your game timeout percentage (percentage of games you lose on time) and this can disqualify that player from entering certain chess.com tournaments if the tournament has a maximum timeout percentage set as a requirement to enter.
Do players who abandon games take any punishment other than losing ranking? As an IT person, I know it can happen, but I know in some game platforms, too many abandonments can result in issues.
I played about 6 games today, and in all of the games I was ahead, the opponent would disconnect right as they started to lose, either after making a blunder, or getting forked. I lose a decent amount, as I'm new and trying to practice, but it's sure funny how disconnects never happen when I'm behind, only when I'm ahead.
Kinna takes the fun out of playing.