The truth is that if you were to consult a battery the last place it would want to be is on a bike or in a car for that matter, heat, vibration, etc., just about everything calculated to kill a battery!
Lead/acid batteries when idle should, in an ideal world, be kept at a stable temperature and provided with a “float charge” i.e. just sufficient current to keep the battery at its nominal voltage, this will reduce the formation of insoluble lead sulphate crystals. It should also be noted that the plates in a battery actually change size depending on their state of charge and because modern batteries are made of “pasted plates”, essentially small particles pressed into a supporting grid, (it’s more complicated than that of course), but the upshot is that they eventually crumble so maintaining a constant voltage will limit this.
A lead/acid battery can loose charge over time due to “parasitic cells” within the plates, essentially impurities in the plates, all rather complicated but essentially you get what you pay for, better makers = better quality control = a longer life – it is to be hoped!
NiCad types on the other hand are usually best stored discharged, they are however mechanically far more robust and durable than lead/acid batteries but they do have their own quirks so the manufacturers’ recommendations should be closely followed. I have a battery made up from 'D' size NiCads on, (sorry about this!), a 57 year old scooter that is still working well 10 years on.