When you're laying a concrete floor, it's very easy to lay pipework first and concrete it in. When the pipes need upgrading or replacing though, it's not practical to remove them though, so new pipes are run in other places and the old ones are simply left in place. They should be capped off so that the pipe doesn't become a route for damp to get into the house, but that's all.
In the 1940s, copper was just starting to replace older cast iron pipes. Lead pipes were the norm for low-pressure internal water, but mains water came in on cast iron pipes. Anything you really didn't want to leak - gas or oil, for example - also ran in cast iron. My 1929 bungalow has an old cast iron pipe in a concrete pad under the old pantry.
Cast iron is brilliantly resilient, and pipes weren't too expensive. The big problem for cast iron though is joining pipes, because the only way is for the plumber to form threads on the ends of each pipe and join them with appropriate-sizes nuts. The threads had to be cut by hand; an old-school plumber once told me that it took a couple of hours per end of pipe, so labour costs were much higher. Cast iron pipes can't be bent either, so every bend needed the pipes to be cut and joined with a corner. Copper can easily be bent though, and joining copper only needs soldering which is quick and easy. Once copper piping became cost-effective for plumbing, it was a no-brainer to use that instead.