The thing about that appearance is that it's easily handwaveable. Perhaps they were ships kept in a museum which have just been liberated by some people who want to show of the iconic ship from the planets history (as you might see a spitfire flying around at a British celebration)... I was sort of hoping there had been one put into the background of a battle shot, as proof the rebels used at least a couple, and justification for them as an XWing ship.
Well, the Shattered Empire comic(which is canon) pretty much explains and does both of that.
The Theed Royal Guard keeps them in storage.
And while not in active service, Leia flies one on a mission immediately following RotJ.
Edited by DarthEnderX