I don't think it is efficiency, we had no way to step up and step down DC as we can do AC
Also, there have been huge breakthroughs in High-Voltage DC: https://en.wikipedia.org/wiki/High-voltage_direct_current
At certain huge (grid) scales they have found that AC and DC swap "efficiencies" again and we're increasingly starting to see current flows as DC-AC-DC "sandwiches" with DC used by the majority of consumer electronics and DC used for extremely high scale grid transport, and AC still useful in the mid-range transport.
Couldn't have said it better, I had a good laugh.
To step up/down DC. There are ways to do it with solid state electronics. One of the ways I’ve seen is to transform the dc to ac internally, change the voltage, and convert and output DC.