The most likely cause for this is that you disconnected, and your computer was not able to reconnect in time. After someone is disconnected for too long, the system thinks that they've left the game, and declares the game abandoned.
The program suddenly let my opponent win.

Here is another one that happened this morning:
In the same time as black moved the Queen to H4, the computer said "black won".
My internet is good, so that was not the cause.

Here is another one that happened this morning:
In the same time as black moved the Queen to H4, the computer said "black won".
My internet is good, so that was not the cause.
You can be disconnected from the live server process, even when your internet connection is fine in general. There can be problems with processes on you your client causing the client code to have disconnects, there can be problems on your ISP, between your ISP and the site data center, or potentially problems on the site side.
If the game ended after receiving the opponent's move, then there was a disconnect from the live server process and when it reconnected, the update both showed the move and game state.
The following has some information to help minimize potential issues:
https://support.chess.com/article/213-how-do-i-fix-my-disconnect-lag-issues
In both instances, it was my opponent's turn to move and his/her's clock was running.
Suddenly the message "white won" appeared. (I had black both times it happened.)
I am grateful if somebody can explain this.
Cheers,
Kiwikuken