Ackbar was originally in the early Imperial Navy or he had some connection to the Imperial Navy on his home world, Mon Cal. He may have been a liaison between the Empire and the military force of the planet itself.
When Vader learned that he had defected to the Alliance, taking a lot of valuable information with him, Vader dubbed him a "traitorous fish".