Extra battery in the bay of an HDD
Some Dell laptops are designed like this, in particular I've noticed this on the XPS 15. Depending on the configuration you get, you may have a smaller battery with an HDD and a small SSD, or a larger battery with no HDD and a larger SSD.
These images are from https://www.dell.com/support/manuals/au/en/aubsdt1/xps-15-9560-laptop/xps-15-9560-servicemanual/procedure?guid=guid-cbca961f-7c16-4c3f-ad46-fa737221ce41&lang=en-us
Some configurations come with the smaller battery and only an SSD, so you end up with an empty space where the HDD would have gone. You can then install an HDD of your choice, or buy an aftermarket replacement battery of the larger size.
Or if you do get a configuration with an HDD, you can take it and the battery out, put in a larger battery, and optionally upgrade the SSD.
This is an interesting idea but isn't feasible for multiple reasons.
Limited capacity:
The laws of physics aren't on your side here.
Battery energy capacity is directly proportional to size and weight. In this case, the dimensions are particularly small and the weight can only be increased to compensate for the small size to a very limited extent:
Electrical connection challenges:
Another problem would be connecting the battery electrically, which would be difficult, if not impossible. Battery connections vary from manufacturer to the next, making it impossible to design a one-size-fits-all solution.
Better options already exist:
For some laptop models, it's possible to buy oversized laptop batteries that extend beyond the laptop chassis:
Alternatively, many ultrabook lines, such as the HP Envy 13, are designed without a redundant 2.5" hard drive slot altogether, offering only M.2 NVMe storage.
For these models, the problem has already effectively been engineered out of existence and there is no wasted space to begin with:
There's no standard connector for extra batteries - they need to interact with the charging system which not standardized across laptops.
Devices like a 2.5" SATA HDD / SSD plug into a power connector that supplies them with regulated 12V, 5V, and 3.3V power. That's the same power bus that powers other devices.
You can't usefully connect a battery to the regulated output side of the laptop's internal power supply. The laptop will maintain the 12V rail at about 12V regardless of whether it's plugged into the wall or not. A hypothetical battery wouldn't know whether to charge itself or try to supply current on the 12V rail. (And it can't just wait until the laptop's main battery runs out; at that point the laptop will power itself off and continuing to supply +12V isn't useful.)
So you would need a special connector to make it possible to plug in extra batteries into the charge / battery side of the laptop's internal power circuitry. I think +20V is pretty common for laptop AC power adapters, so probably many of them run their internal batteries in series at that voltage, but IDK how standard any of this is.
It might be plausible, but it would require a whole bunch of standardization work between industry players to create a standard for batteries that work across laptops in the 2.5" form factor. Including physical connector layout, electrical stuff, etc. These are potentially high-current cables where we want to minimize resistive losses.
And then manufacturers would have to add an extra internal connector or cable to laptops they sell, which for the large majority of laptops would get no use. So it would be extra stuff on the bill of materials, an extra step in assembly, extra design work, and a small amount of extra weight.
Plus it introduces the possibility of cheap batteries that catch on fire, and nobody wants that possibility for their laptops. Airlines might start banning laptops from brands that had an internal extra-battery connector...
So the only really sensible thing is @Saxon Druce's answer: make the main battery optionally larger and fill the 2.5" bay, on a per-model design basis. Or other per-model battery options like sticking outside the chassis, or simply a cost+weight vs. capacity tradeoff for internal batteries.
Airspace inside a chassis wastes space, but not weight.