Unfortunately this mindset is so common that even most "Marxist" movements have corrupted the "to which according to his needs" to "which according to his work/contributions".
Marxists movements have not corrupted it, you just haven’t studied Marxism, specifically Marx’s Critique of the Gotha Programme, from which that phase came.
However, before reaching the end goal of communism, one must go through the “lower phase” of socialism, wherein it is, “to each according to his contribution.” But even so, in this phase the state is still to provide a social safety net for those unable to work.
Communism has not been yet been reached, as any communist party of any socialist state will tell you themselves. It’s a long-term project, and it probably can’t be reached until socialism has been spread around the world, because as long as capitalist/imperialist states exist, they will attack the socialist states.