This is great, but why use raspberry pi? Seems like the same functionality would be easier and more robust using an embedded-type system like Arduino. Teensy boards in particular can act as USB hosts.
It's not a full Raspberry Pi, but their RP2040 microcontroller based board. Teensy boards are awesome but they are kind of pricey. This one is 4-5$, it's in stock everywhere, and what's usually the most important reason for making such decisions - I had two lying around from a previous project :-)
Most times, the answer to these types of questions on hobby projects is that the maker either knew more about Pies than Arduinos, or simply had a Pi lying around and not an Arduino in their home when inspiration struck, heh.
I've certainly been guilty of doing something "a worse way" simply because it's what I first thought of and was available to me, and you gotta strike while the mental iron's hot.
These are Raspberry Pi Picos, they are embedded type devices and not the usual Pis you're used to. The keyboard I'm using right now uses the same chip (RP2040) as the Pico, runs QMK and seems to be more performant (flashes faster anyway) than the normal microcontrollers you tend to get in plancks and the like.