Basically I will keep this as simple as possible, a battery is a device to store electricity and works by chemical reaction, the amount of electricity and it’s ability to release this stored electricity is determined by it’s construction, condition and what electricity has been inputted & stored.
So, all batteries are not the same, in construction, type and design, some function better for certain tasks than others.
The vast majority of batteries used on H-Ds are now AGM and designed to deliver a high ampage output for electric starter duty within a relativity small size, they are lead acid and sealed so you cannot replenish the electrolyte (The distilled water/acid mix) or have to top this up.
Most battery chargers and initial testing will be on the battery standing voltage, so if it reaches this, it will show as charged, however the capacity or rather ability to deliver a high ampage for starting may be impaired due to various reasons e.g. shorted cells, buckled plates, lack of electrolyte etc. so could only have 40 or 50% of it’s working capacity, in the old days the charge of a lead acid battery could be determined by taking the Specific Gravity of the electrolyte, but you could also still have the same capacity problems so no real test of condition.
A charger such as an optimate will do a test by switching off the charge and monitoring the voltage over a period of time, may even put a slight load on, so if the voltage does not drop within the limits, it will say it is good.
There are battery conductance testers that will test the internal resistance of a battery and give an indication of its condition and performance, these are however not infallible and can also sometimes show a battery good when it is not, however they rarely show one that is bad when it is not.
The real conclusive test is a practical load test, i.e. will it start and as detailed by KiwiDave many times and watch the volt drop.
A word of warning, it is not best practice to use one of those old Battey load testers, i.e. with and piece of corrugated metal to test a motorcycle AGM battery as these can easily draw what is an excessive current and damage the battery permanently!
What damages the battery, over charging, i.e. high constant current over charging or over voltage such as due to a faulty a voltage regulator/alternator, a full or near to full short circuit, (Back to the old battery load tester) or excessive load …and by far the most common, leaving the battery in a full or near full discharged state, most AGM batteries will lose most of or suffer a very significant reduction in capacity permanently if this happens and is left for some time i.e. Weeks!
These will mostly all initially boil off all the electrolyte, that you can’t replace and or buckle & sulphate the plates that will stop or hinder the chemical reaction.
AGM batteries are not like the old flooded lead acid batteries (the ones you could top up) that worked well on a charge/discharge cycles, this effectively works by using the charge cycle to cause gassing on the plates and dislodge any contamination on the plates, do this on an AGM and you can start to loose the electrolyte that can’t be topped up!
Best battery maintained for longevity, is regular use, if not, then left on a smart charger, to keep it monitored and fully charged.
Do not let it get deeply discharged. A battery is only as good as the plates in it, so you can have the same box but with not such good plates and materials thus cheaper, these will not last as long!
I would also say, most times you know when your battery is starting to fail as it will be slow or struggle to start, that is the time to check & test, never assume it's the battery, always check the charging system and connections first or you may well be buying a second battery quite soon!