Simplified...
USB Type A connectors can only handle 1.7 amps before they get hot enough to distort (they are designed for 1amp), while Type -C can handle up to 5 amps depending on the port. Because the cable was plugged into a hub that can handle 3amps (hubs are rarely power managed), and something (I assume the keyboard) tried to pull 3 amps and damaged the cable and possibly that port on the hub.
If the device being pluggged in is low amperage, or the power supply is low amperage, it's fine to use these cables because there isn't enough power to cause damage, but the cable manufacturers are not telling you and most people don't understand any of it anyhow so you have people plugging A to C cables into powered hubs to fast charge a phone and frying the ports. Phones are one of the few devices (for the moment) that can draw enough power to be an issue. I;m kind of surprised a keyboard did it, I'm guessing it has lots of LEDs in it.
The threat to laptops and desktops is exaggerated as most are power controlled by the OS, which is why windows shut down the port, however on some, manufacturers sometimes use hubs in order to reduce wiring or because they are too cheap to do it properly. Companies know not following spec is cheaper, and there is no one to punish them for not doing it.
While I like the Type-C connector and it's possibilities, it's a massive steaming pile of dog crap in terms of specs and compatibility, it's as bad or worse than all of the older USB specs combined and the USB consortium lets manufacturers get away with pretty much anything. This is why USB 1.1 was so bad, it was changed in order to confuse customers and sell older hardware. Here's just a few I've run into:
Can that port charge the laptop? Not all can, even on the same laptop.
Is it Thunderbolt? Some only include a single Thunderbolt but many Type C ports.
If it is Thunderrbolt, does it support EGPU
If it is TB, does it support Display Port?
If it is TB, d it support HDMI?
If it is TB, does it support 3 or 5 amps? Or did they short change it and only do 1amp.
Is it even USB 3.1 or is it a USB 2.0 or 3.0 connection in a type C form factor? Samsung shipped type C cables that were only 2.0.
If it really is a 3.1 port, is it 5gbps or 10gbps
If It is Thunderbolt, does it conform to spec, or is it fickle and only works with specific onboard chips. On Macbooks, HDMI adapters need to have a Texas Instruments chip in order to not flicker.
Some laptops are a mashup of all of these and only reading the technical specs manual will answer it.