The reason for that is probably lost somewhere in the archives of the Winchester Repeating Arms Company's marketing department.
Perhaps they felt .40-40 was confusing and too close to it's big brother the .44-40? It was originally introduced for rifles and I'm not sure what the competitive landscape looked like in the lever action rifle market in 1874.
I've never heard an explanation for that one. Some things remain a mystery.
As others have pointed out above, many of the early cartridges accepted heeled bullets (reduced diameter bullet body to fit into the cartridge case, larger diameter forward portion to fit the bore and groove diameters).
The ..38-40 utilized a different approach, having a smaller diameter lead bullet with hollow base intended to open up to seal the bore and grooves upon firing.
The .38-40 cartridge was originally called .38 Winchester Center Fire (WCF), while same case with .44 bullet was known as the .44 WCF. Original loadings of both utilized cast lead bullets somewhat smaller in diameter than the (then standardized) bore and groove diameters.
Later on in the decades of cartridge developments other manufacturers started chambering firearms for the Winchester-developed loads. Some used marketing terms featuring their own company's name, some simply wished to avoid promoting a competitor's name (Winchester), perhaps some wished to avoid claims of copyright infringements. Regardless of the specific reason, these two cartridges became commonly known as the .38-40 and .44-40, terms which identified the nominal caliber and the original weight of black powder charge (40 grains).
Similarly, Winchester's developments for the smaller-framed rifles (.25 WCF, .32 WCF) became more commonly known as the .25-20 and .32-20 as they gained popularity and general use among a number of firearms manufacturers.
Prior to about the early-1910's most of the major firearms companies stuck with their own proprietary cartridge designs. Colt, Marlin, Sharps, Winchester and others all offered a variety of cartridges, and few offered any chamberings other than their own. This created confusion in customers' minds, generated debates over the relative merits (accuracy, killing power, etc) of various makers' offerings, and vastly complicated supply lines (especially in remote areas). Custom gunsmiths were offering rechambering services to "improve" one maker's rifle by chambering it for another maker's cartridge.
All in all, it was a challenging and confusing time period for everyone involved. By the very early 20th Century the move was on for more standardization of cartridge designs, rifle chambers, bore diameters, and other aspects of the business. Some manufacturers continued making the earlier proprietary cartridge designs to serve their customers, some designs passed into history and owners of some firearms had the choice of abandoning use or having the rifle altered to an available cartridge (a process that led to even more problems along the way).