When I read about World War II, more specifically about the use of cryptography in that war, I get the impression that the Allies were much more successful in breaking the enemy codes than the Axis Powers. Two such successes are particulary important: the breaking of the Enigma code by the Polish and the British and the breaking of the Purple code by the British and the Americans.
My question is: why were the Allies so much better here? Of course, a possibility is that they had a larger pool of highly skilled people. But is that all? Or is it also because their governments decided to bet more on that than the governments of the Axis Powers?
Edit: Thanks to the comments, I am now aware of some successes of the German code breaking and also of the fact that the Germans never had a central cryptography agency. But why is that? And what about Japan?