Some rear derailleur hangers take some space in the rear of the right dropout. Perhaps your spacer was inserted when such a derailleur was present to take up a similar amount of space so that the wheel would sit straight when pulled all the way back on both sides.