Why do I get a signal even though only one wire is connected?
Well, the fan is putting a signal on the RPM wire. The conductive fan forms one plate of a capacitor and your arduino forms the other plate with the air between them as a dielectric. So, even though you can't see it, that circuit still has two connections. (Actually, a better explanation is that both have capacitive coupling to earth ground - the one between them is essentially the combination of those two series capacitors).
So, while there is physically only one wire, there is still a second signal path due to the capacitor formed between your two devices. This then forms the new measurement ground for the RPM signal. What that reference actually is depends on the capacitance of the capacitor and the potential difference between both sides (in other words, how much current is flowing through that cap). When you directly connect ground, you short circuit that capacitor causing no current to flow through it (since the potential difference at both ends is the same).
So even if that signal only ends up swinging from 1.4v to 3.6v, that's about enough to show up as a digital logic 0 to 1 transition.
Want to see more of this - if you have a multimeter that can measure frequency, tie one end to your mains gndhot or neutral and the other end to a hand sized piece of aluminum foil. See that 50hz (his profile says Argentina) signal? Guess where you're picking that up from.