Welcome to FlightAware efbrady.
Try to include a link to whatever flight you may be talking about in the future, makes it easier for everyone to find it
The flight in question: flightaware.com/live/flight/AAL2 … W/tracklog
It could be either an ARINC mishap, or an FA bug, or maybe even an incomplete radar hit where the altitude wasn’t picked up, which is what I think happened here. When that happens, it tends to choose the filed final altitude. In this case, it was FL400. Notice that it went from 15,500 to 40,000 to 21,700. I’m going to guess they were at about 18,500-19,000 for that radar sweep.
A while ago, it was happening quite a bit where it showed either the filed final, or zero. I believe that bug was resolved some time ago.