Why do AC-to-DC adapters have long cables on both ends?
Usually for thermal management or mechanical compliance.


thermal -- placing the power supply away from the potentially hot device and away from the wall (better airflow) results in the most efficient operation.
mechanical -- large power supplies would block adjacent outlets if connected directly. They can also be heavier than can be safely suspended (hung) from wall outlets.

Basically no... except for the above mentioned reasons.