Is it safe to charge a MacBook using a male-to-male USB-A/USB-C cable plugged directly into wall outlet?
I have a 2015 12-inch Retina MacBook. I also recently found (randomly) a cable that is a male-to-male USB cable, with a Type-A male plug at one end and a Type-C male plug at the other end. The MacBook has only one port -- a Type-C USB receptacle port (looks like a Thunderbolt port, but it's pre-Thunderbolt).
Normally the correct way to charge the battery of the MacBook is to use the 61W USB-C power adapter (Apple model #1718), plugging its USB-C male end into the USB-C port on the computer, and then plugging the power block into a wall outlet.
But what would happen if I dispensed with the standard power adapter and simply took my male-to-male cable and plugged the USB-C end into the computer, and then the USB-A end into a standard USB-A-to-2-prong-charger-plug which I then plugged into a wall outlet?
I (perhaps foolishly) tried doing this for five seconds, and the power-charging battery indicator in the menu bar at the top of my screen did indeed indicate that the computer's battery was successfully in the process of charging. But I quickly unplugged it, unsure if I was going possibly going to fry my computer in some way.
If using this USB male-to-male cable to charge the computer this way was safe, then what purpose would there be to have a power adapter in the first place?
But if it isn't safe, then why did my menu bar show that the battery was charging as normal?
Any advice would be greatly appreciated.
MacBook, macOS 11.2