https://www.oxfordreference.com/display/10.1093/oi/authority...
Cantor and Frege adopted this definition of "the same size as", although already Galileo argued that it would lead to absurd consequences when applied to infinities (there would be as many square numbers as natural numbers, even though not all natural numbers are square), which is known as Galileo's Paradox.
For finite numbers any one-to-one correspondence between F and G means that neither can be a proper subset of the other, which seems just as plausible a requirement for "the same size as" as the former. Since the two requirements come apart for infinite sets, it is unclear which to keep, or whether size comparisons even make any sense for infinities. Galileo concludes they don't make sense.
Hume's Principle is actually not uncontroversial among philosophers of mathematics, but many people treat it as some kind of objective fact rather than a proposed conceptual analysis of "the same size as".