First of all the M1carbine was not made to replace a pistol. Second it was planned for as the military knew back as early as 1939 that the US was going to be getting into a shooting war. That is why they pushed for the carbine to be developed and tested in the 1940/1941 time frame.
The carbine was meant for men who would have had to carry a pistol if the carbine had not been developed. The military designated the carbine as a light rifle and the same with the carbine ammo. If it was to replace the pistol then the contracts for the .45 Colt acp would have been cancelled and those funds directed to more carbine production. Both the carbine and the .45 had their places and one was not to replace the other.