This was addressed in a feature on the old "Ask the Jedi Council" website on Starwars.com. In short, the Academy is not exclusively for the training of Imperials. It also provides staff for various exploration and merchant vessels.
Q. In Episode IV, Luke wants to join to the Academy. Surely he wasn't planning to join an Imperial military institution just as a
means of leaving Tatooine? Could you explain exactly what this academy
is?
A. The Academy is an esteemed and ancient institution that trains young cadets for rewarding careers among the stars. It has three
principal branches -- Exploration, Military and Merchant Services.
When the Empire rose to power, it began transforming the Academy into
a training ground for officers in the Imperial starfleet. Many young
men and women were conscripted into Imperial service from the Academy.
The Academy is not just one campus -- it has many offices scattered
throughout the galaxy.
Biggs Darklighter joined the Academy, and received a comission aboard
a non-combat vessel, the freighter Rand Ecliptic. Luke Skywalker
assured Biggs that when he joined the Academy, he wouldn't be drafted
into the Imperial starfleet, though it is unclear as to how Luke
intended on avoiding such a fate.
Ask the Jedi Council - Jocasta Nu