Keyboards are primarily used to type (like, way, way more than for gaming), thus the underlying technology is designed for that i.e the device delivers a digital signal that identifies a keystroke, the operating system interprets that signal and sends a suitable message upstream. Adding anolog variability to a keystroke is pointless for what a keyboard is designed to do. 99% of the time when people press 'w' they want to type a w not "move forward in videogame". Using keyboards for videogame controls is a strange and unexpected development and they are fairly unfit for the purpose. Keyboards as controllers are unergonomic nightmares born from lack of resources and a bit of inventiveness when they were the only method of interacting with a computer many had, but ultimately it is a bodge to the problem of user interaction with something other than text-entry.
To elaborate on the differences between keyboards and controllers on the technical side: When you press a key, like 'W', on a keyboard your operating system sends a message to your application that is basically "The 'W' key was pressed" or "The 'W' key was pressed and released" and then your program looks up "what am I supposed to do when 'W' is pressed, oh, I'm supposed to moveForward()", meanwhile when you move a joystick the OS just sends a "The controller was updated" message, then the program checks the controller state and reads the joystick's value which is basically "The left thumbstick is at position (x,y)". Then your program can figure out a what to do with that information e.g adjust the movement direction and speed to match the (x,y) value's displacement from (0,0).
To get anolog controls in a keyboard it'd need to not be a keyboard on the software level by having the hardware detect as something else (say, a controller) and when you have that you might as well make the whole thing more pleasant to hold and interact with (i.e not a rectangle filled with buttons which you use less than 70% of more than 90% of the time).
On the software side if you're not mimicking the inputs of a XInput controller any application developer pretty much has to implement a brand new API just to support one fancy peripheral that most people won't have.