Universal Serial Bus (or USB) connectors are a kind of connector meant to standardize computer peripherals, first created in 1996! The most common adaptors before this, serial and parallel ports, worked fine when it came to data and power transfer, but since they came in all sorts of pincounts and orientations, matching two pieces of hardware together could get difficult.
USBs were made to alleviate this, but since they themselves can come in many sizes and shapes, further efforts to reach the one true USB connector that will always work are still underway over twenty years later. Right now, the favorite for this role is the USB-C connector, which is small, symmetrical, and forwards compatible, meaning that future ports will be able to take old cables, and vice-versa. The European Union recently declared that battery devices must become USB-C compatible to be sold there!
For a time, Apple hoped it’s Lightning connector would be the default, rather than USB-C. Lightning connectors can also transmit data and power, and are also forwards-compatible, but USB-C connectors were already considered an industry standard by a number of manufacturers, and so eventually Apple had to admit defeat and plan to switch to USB-C in the coming years.
While some tech will always be left behind by standardizations (just think of how much legacy equipment is running on Windows XP, with its own special power or data cables) this standardization aims to reduce the amount of electronics waste generated by broken connecting or charging cables. If everything has its own cable, you end up with a drawerful of cables, and should you break one for a niche gadget or toy, you may find that the cable it needs is not sold separately, or not sold at all. The lack of a cable might cause you to throw away the gadget, even if it still works, because you have no way to power it!
But if devices become standardized such that your headphones, your camera snake, and your favorite RC car all charge off of one type of cable, you don’t have to throw one out when the cable breaks, and you only need to purchase one or two cables total.