Technically, it depends how the cable is built. In USB 2 standard these cables are not allowed at all, and USB 3 standard allows these cables only if they are build according to the standard.
They are not illegal (there is no jurisdiction with laws against them), and they are cannot be banned as they are just cables. They are just stupid, useless and non-compliant according to old specs and thus should not exist at all for any purpose, and they are only compliant according to new specs if made correctly without power supply connection.
As you might be aware, there are USB hosts and devices. To put it simplified according to old USB standards, Type A socket is used on hosts, and Type B socket is used on devices. And hosts are supposed to only be connected to devices, which is why we have cables with Type A plug on one end, and Type B plug on the other end. So you are not supposed to connect two hosts together, or two devices together, so there should be no need for cables with same type of plug on both ends.
The host is also supposed to give power to a device, so there is 5V supply available on host Type A connector, which the device can use for powering itself (e.g. sound interface) or just detect the host for presence (e.g. printer with separate power).
Now, if you have a cable with Type A plug on both ends, it allows you to do unintended things, as you can connect two hosts and their power supplies together. Two hosts cannot communicate between each other, and the power supplies are now also shorted together through the cable. If you turn off one of the hosts, the other host tries to back-feed power into the other host.
As that is not in any way an intended connection, one or both hosts may get damaged, as you are not supposed to connect power supplies together.
So this is why Type A plug to Type A plug cables should not exist, there should be no need for them. But as something always goes wrong, someone used the Type A socket incorrectly on some device instead of Type B socket, and then a Type A plug to Type A plug cable must be used to attach that device with incorrect connector to a standard PC.
Modern USB specs allow these cables to exist for debugging purposes, as some products that are usually USB hosts may be able to go into device mode for debugging purposes by connecting it to another host like a PC. But as explained above, to prevent shorting of the power supply pins together, such a cable must be manufactured so that there is no connection between the power supply pins of the connectors.
The cable should also be specially marked as being such a compliant debug cable, to distinguish them from the dangerous non-standard cables that should not exist.
Answer from Justme on Stack ExchangeVideos
standard - Are USB 2.0, Type-A, Male-Male cables compliant with USB specification? - Electrical Engineering Stack Exchange
Can a male to male USB A be used to transfer files between two computers?
USB A male to USB A male cable
Convert USB 2.0 male header to USB C front panel header
Technically, it depends how the cable is built. In USB 2 standard these cables are not allowed at all, and USB 3 standard allows these cables only if they are build according to the standard.
They are not illegal (there is no jurisdiction with laws against them), and they are cannot be banned as they are just cables. They are just stupid, useless and non-compliant according to old specs and thus should not exist at all for any purpose, and they are only compliant according to new specs if made correctly without power supply connection.
As you might be aware, there are USB hosts and devices. To put it simplified according to old USB standards, Type A socket is used on hosts, and Type B socket is used on devices. And hosts are supposed to only be connected to devices, which is why we have cables with Type A plug on one end, and Type B plug on the other end. So you are not supposed to connect two hosts together, or two devices together, so there should be no need for cables with same type of plug on both ends.
The host is also supposed to give power to a device, so there is 5V supply available on host Type A connector, which the device can use for powering itself (e.g. sound interface) or just detect the host for presence (e.g. printer with separate power).
Now, if you have a cable with Type A plug on both ends, it allows you to do unintended things, as you can connect two hosts and their power supplies together. Two hosts cannot communicate between each other, and the power supplies are now also shorted together through the cable. If you turn off one of the hosts, the other host tries to back-feed power into the other host.
As that is not in any way an intended connection, one or both hosts may get damaged, as you are not supposed to connect power supplies together.
So this is why Type A plug to Type A plug cables should not exist, there should be no need for them. But as something always goes wrong, someone used the Type A socket incorrectly on some device instead of Type B socket, and then a Type A plug to Type A plug cable must be used to attach that device with incorrect connector to a standard PC.
Modern USB specs allow these cables to exist for debugging purposes, as some products that are usually USB hosts may be able to go into device mode for debugging purposes by connecting it to another host like a PC. But as explained above, to prevent shorting of the power supply pins together, such a cable must be manufactured so that there is no connection between the power supply pins of the connectors.
The cable should also be specially marked as being such a compliant debug cable, to distinguish them from the dangerous non-standard cables that should not exist.
They don't follow the USB specification. The USB 1.2 and 2.0 specify that the ends of the connectors define whether a connection is a host or a device. The male to male A connectors would be host to host, which is not supported under the USB spec.
They are typically used in cheaper devices that either use power only or the designers were too lazy or incompetent to understand that a device needs a B connection, so people still sell and use them. No entity prevents the use or sale of a nonstandard cable that I'm aware of.
If not, what are they typically used for?
Hey guys, it's my first time making this kind of post coz I'm hella confused. I dont know if its the right place to ask this question but kindly do help me out with this if possible.
I have an arcade stick and it has a 5pin female (from motherboard) to USB 2.0 male output for connection (Reference Pic 1). However, the cable management is poor. That's why I wanted to have a detachable cable mod. Normally, I could shorten the cable but dont have tools for it.
Alternatively, one could buy that same cable in short length. But I couldn't find it where i live. The one i found is 5pin female to USB 2.0 female output (Reference pic 2) and not the actual intended like was in pic 1.
I would like to know if I could use that cable in my stick and then use a USB male to male cable or even USB A male to USB C. Even if i could use it, will there be any consequences as i read that we are not supposed to use male to male unless it has A,B male types.
Please do leave your suggestions. I would really appreciate it.