At the beginning of the electronic computing era in the 1950s, computers were mutually incompatible both in terms of hardware and software. It was impossible to use peripherals (e.g. punched card or tape readers, printers, etc.) for some computer with another one as there was no common interface. The same was mostly true for software. Programs created for one computer often could not run on another because programming languages (or rather assemblers or microcode) were unique to each computer (although first versions of Fortran, Cobol and Algol were introduced at the end of 1950s). So when a customer bought a new computer, new peripherals also had to be purchased and software completely (or at least partially) reprogrammed. This changed in 1964 when IBM introduced System/360, a scalable computing system with mutually compatible peripherals, common programming language(s) and operating system. It was even possible to emulate IBM older models (e.g. 1401) on System/360. After that, some other computer manufacturers started to produce computers compatible with IBM systems.
I can understand that at the beginning, there was a lack of standards, and each manufacturer tried to lock its customers in and avoid switching to competitor's products. However, I do not understand why computers produced by manufacturers were incompatible with each other, and software had to be rewritten after an upgrade. In IBM, there were even two rival teams of engineers, placed in different factories. The first team produced smaller computers such as 600 and 1400 series and second one mainframe computers (series 700 and later 7000). Each product line had its operating system, programming language and peripheries as these teams did not collaborate.
So, why did it take so long (until mid of the 1960s) to introduce common standards even within one company? Was it more about technical reasons or business ones (e.g. development of System/360 cost IBM about 30 billion of today US dollars)?
Note: Information about IBM is based on the book "IBM: The Rise and Fall and Reinvention of Global Icon" by James W. Cortada.