Standard dimension for Li ion batteries
Standards are developed and agreed by companies to make it easy for end users to have interchangeable or interopearable parts, like light bulbs or AA batteries or headphone plugs and sockets. Internal components which are not accessable without screwdrivers, soldering irons or heat guns are not considered to be accessible by end users, only by service technicians since they need to use particular tools and skills. There is little incentive for manufacturers to co-operate on standardisation work for internal components, and a high incentive for them to design custom parts.

There is always some trade-off when using standardarized parts that they may not be optimal in all aspects for the application. Since everyone wants their battery life to be as high as possible, the manufacturer has the incentive to fill the available space with the battery, not just to be forced to choose the existing battery with the nearest size to what they can fit, and waste the remaining space.