A battery gets discharged mainly for 2 reasons
1. Battery discharge due to sulfonation
If a car battery is left unused for a period of time on a low charge ( You can check the charge with a volt meter -A volt reading below 12.4 volts means the battery is in a discharged state) a process called sulfation occurs.
Lead Sulfate crystals form on the battery plates in a situation of disuse of the battery and the bigger the crystals the harder they are to dissolve and get recharged.
This in turn decreases the capacity of the battery to get charged and also to maintain its charge.
2.Battery discharge due to car or bike alternator malfunction
The alternator is the part of a car which is responsible for charging the battery , and if it is not working to its optimum capacity, the battery will not get charged to its full capacity.
This can lead to a reduction in battery performance.