It's still a thing in some European countries.I've seen videos from WWII where the polish army rolled out with horses against the Nazis in tanks. They had a lot of heart for the fight!
In France we still have a military unit, the Republican Guard, that still practices the horseback charge.
They provide military escorts for the French president or visiting heads of states.