Erm, for the (obvious?) reason that the fractional representation of a number is not unique, the medians can't be the same.
EDIT: as per Glen's request
The location of the median relies on the ordering of numbers in your set. Suppose you order your numbers from smallest to largest, so you have something like this {1,2,3}. You can maintain the same median if you perform a transformation only if that transformation preserves the ordering. For example, if you add 1 to every single number in your set, location of the median doesn't change: {2, 3, 4}, i.e. it is still located in the second position.
Any linear transformation maintains the order. The maintenance of order is key. That's the "property of mathematics" that's really being referred to below. (And how you define order is also key. Note that order is essentially a notion of distance. 2 is closer to 3 than to 4 because the distance between 2 and 3 is smaller than the distance between 2 and 4). That's why, for positive data, in some instances, it is allowed to apply a log transform of your data - you haven't fundamentally altered the ordering of the numbers, and thus you haven't changed the underlying relationship between your variables. You can do a log transform for say, income data, but you can't do it for inflation data.
If a transformation is not linear, the order is not necessarily maintained. Transforming every number into a fraction is not a linear transformation because the fractional representation of a number is not unique. 1/2 is the same as 2/4. That's why for "large" sets the location of the median changes if you transform your numbers into fractions in the way that you described. For large enough sets, you're eventually going to run into a situation where you have the same fraction in multiple places.If that happens, your set "shrinks" and so the median must change.