There are two things that would most likely cause this to happen:
The controller entering in the new altitude in the computer before issuing the instruction or the radar just missing the mode C on a sweep of the radar by chance (substituting the soon to be assigned different alt).
The aircraft climbing or descneding so rapidly the mode C can’t keep up.
The second one happens often in busy airspace. For example, aircraft departing ALB…they climb on a 320 heading away from crossing traffic going SW into EWR and BDLs going eastbound just south of ALB (RKA.SWEDE1). The faster they climb above FL200 or so (above that other traffic descending) the faster the turn on course. “Callsign, maintain FL230, upon leaving FL200, turn left heading 170 direct PWL.” You’ve never seen aircraft climb so fast. Planes give us 6000fpm through FL200 so they can get on course. The instruction is issued around 8000, so in about a minute and a half, they are through FL200 turning left on course. The mode C goes XXX and FL230 is in the computer as a hard altitude.
Some call it being fuel effecient, I call it bribery to miss traffic.
Lets not forget that some planes just don’t have an operating Mode C either by choice or becuase its broke. And sometimes radar contact is lost. Thats when the controller enters the altitude as REPORTED by the pilot, not by the radar.