They weren't robots, they were real bugs, and to get the full story about how he came to be captain if the ship and their leader, you'll have to read the last "Spike" miniseries published by IDW. Basically their original bug captain was killed and left Spike in charge of his ship and crew, who were the last surviving members of their race.