That changed later when many railway companies were taken over or founded by the respective German states such as Prussia, Bavaria, etc.
These various state-owned companies and thus their numbering schemes were retained after German unification in 1871 and kept until well after World War I.
One of its first tasks was to introduce a numbering scheme that allowed to integrate the existing various pre-DRG classes.
Besides, the DRG constructed the so-called Einheitslokomotiven (unified or standardised locomotives) to renew rolling stock and to overcome the expensive necessity of keeping dozens of different classes with hundreds of different parts.
Diesel locomotives received class numbers indicating one tenth of the horsepower rating (according to the original design), e. g. V 80 001 was the first unit of class V 80 introduced by the DB in 1953 with originally 800 hp (later re-engined to 1100 hp).
Electric and diesel railcars and multiple units were designated by prefix letters ET and VT, respectively (from German Elektrischer Triebwagen and Verbrennungsmotortriebwagen).
However, in 1940 a system using class and ordering numbers, like for locomotives, was introduced for electric multiple units.
A plan to introduce a similar system for diesel railcars and multiple units was put on hold due to World War II; in post-war Western Germany (FRG), the Deutsche Bundesbahn eventually followed through while in Eastern Germany (GDR), the Deutsche Reichsbahn continued to use the pre-war system for pre-war vehicles while starting off several new numbering plans for post-war units over the years, thus ending up with a hodge-podge of conflicting schemes for diesel railcars and multiple units until 1970.