Probably the first driver for custom firmware is custom layouts.
Some people like some fairly exotic layouts. For example, a lot of smaller keyboards rely on multiple "layers" hidden behind modifier or toggle keys. Or you may just want a few programmable macros. For example, I have the incantations for my KVM switch mapped to a few uncommon key combinations.
If you're moving between different OS's or even machines, it might make more sense to bake all the smarts into the keyboard rather than to try to get several different software installs to behave consistently.
There are also a lot of gimmicky things you can add with custom features: per-key light effects, little OLED displays with graphics or statistics, faster scan rates.
You get some true horror stories coming from embedded engineers dabbling in software in this fields, the firmware is probably some of the least tested, verified, and generally visible code in many stacks.
But the reason why you'd want user programmable keyboards is the ability to change which keys do what. My keyboard has four different layouts ("layers") that have totally different keymappings. I use them for daily work, work macros, and video gaming.
Software for keyboards has a long history. Custom software for keyboards, not as much, but it's a pretty established niche. QMK firmware mentioned in the article is a few years old.
Because USB is very complicated. I'm sure you could do it 100% with hardware, but then your keyboard's source code will be Verilog since you would need an ASIC