I think others have answered “What they’re used for”. As for “why the distinction exists”, it’s probably worth pointing out that very few languages are designed, rather they evolve.
According to Wikipedia, there’s five major eras of Japanese:
Old Japanese (~700AD)
Early Middle Japanese (-1200AD-ish)
Late Middle Japanese (-1700AD-ish) + Classical Japanese (-1800AD-ish, but primarily written)
Early Modern Japanese (-1850AD-ish)
Modern Japanese
Anyway, Classical Japanese is what Japanese students need to study a little bit as 古文 in high school, and when you come across “archaic” Japanese in media it’s usually just borrowed a few words from Early Modern Japanese or older periods of Modern Japanese.
The 一段 (る-verb) vs 五段 (う-verb) distinction has its roots all the way back in Old Japanese, or even earlier (Old Japanese is the oldest form we have written evidence for, so everything before that is just speculation). It seems they think there actually was a pattern in the earliest forms of Old Japanese, where the types that later merged into modern 一段 verbs were mainly compounds of あり or a small list of exceptions that were mostly verbs derived from adjectives, so they think there was only about 100 一段 verbs. Then in later stages intransitive verbs started to be separated and treated as ニ段.
But this simple structure didn’t survive 2000 years of language evolution as new or changing words would just get put in the category that “sounds right”. So even by the time of Classical Japanese it’s hard to say there’s a meaningful rule as to what types of verbs are 一段 or 二段 (which all became 一段 in Modern Japanese) and what types are 四段 (which became 五段 in modern Japanese).
So the reason the distinction exists is basically “it’s the best approximation of what people were already doing when they started writing down rules over 1000 years ago”, which isn’t a great “meaning” as such, but welcome to social sciences I guess.
As for why any of the more structured language reforms in recent centuries didn’t abolish this distinction, it’s probably a matter of cost-benefit decisions by those doing the reforms. Sometimes the 一段 / 五段 distinction is all you have to disambiguate certain verbs in conjugated forms, so they’d need to start replacing/changing commonly used words if they wanted to abolish the distinction and that probably seemed like a lot of effort. Similar to how they didn’t decide to change は and を particles to be spelled わ and お, or make くる or する regular.