I don't think the wholes are the same because if you imagine a cup cake and a cake of different sizes cut into equally 5 pieces, one piece of the cup cake won't be the same size as the piece of cake.
or fractions are to show the fractions of something, so just because two fractions are the same it doesn't mean the whole numbers are the same too.