There’s a strong case for dedicated motorcycle battery chargers. Most batteries will ... so you can’t connect the terminals the wrong way around, or automatic charge rate adjustment optimised ...
Ralph’s simple battery charger is essentially this simple voltage regulator circuit. He chose the voltage-setting resistors R1 and R2 to give him 2.5 V on the TL431 when the output sees 3.6 V ...