I've always thought this to be caused by the server compensating for a pre-move, which, to the best of my knowledge, is a way to tell the server that ZERO time has passed during that move. Of course, the Chess.com software will count down until it receives the ping from the server, which is likely to be delayed due to wifi strength et al. Hence, the time counts down but when the move is actually made, the time is reimbursed.
I think?
Often I notice - especially in the dying seconds of a rapid game – my opponent gains time instead of loosing time with each move. How is this possible?