The maintenance costs aren't the repair costs for a ship. Maintenance is the abstraction of the work required to keep the ship in operational condition under normal use (i.e. noncombat use). This may be anything from repainting the hull to replacing lightbulbs in the corridors to replacing bad capacitors in the weapon banks - the normal work required to keep the ship in working order when someone hasn't blown a hole in the ship. The maintenance costs listed for a ship are the estimated yearly costs of maintaining that ship, based on the current costs of the resources required for the components, some fraction of which will be "repaired" or "replaced" during the not-actually-appearing-in-the-game annual maintenance work done on the ship. It is this fraction of the ship's components that you pay for when you pay the maintenance bill for the ship (along with the assumed labor required for this, and also the stockpiles of spare parts for the ship that we can assume your empire purchases for its fleets).
This isn't the cost of fixing combat damage, this is the cost of normal maintenance work. You can go for decades within the game where 90% or more of your fleet never sees combat and yet still you'd pay these maintenance fees for each and every one of your ships. The game may not show you that your ships are wearing themselves out by all that cruising around that they do, or that they're wearing out the gun barrels, missile launch tubes, and laser capacitor banks through gunnery drills, or straining the power systems, or patching holes from micrometeor impacts, but these types of things are there in the abstract, as represented by the maintenance bills for your fleet.