How did "at once" get to be used to mean "immediately"?
Solution 1:
The sixth and final definition of at once in the OED means "immediately, straightway" and is first documented in William Tyndale's Expos. & Notes way back in 1531:
The apostles were clear-eyed, and espied antichrist at once.
It comes from a meaning of "at one time" and other definitions of at once are of things happening at at the same time; or in one heap or body together; or at the same time or simultaneously.
So the "immediately" sense can be similarly thought of as things happening all at the same time, or right now.
Join the army at once & help to stop an air raid
Or:
Join the army right now & help to stop an air raid
You read the poster and then join the army all at the same time, or immediately.
Solution 2:
Since the literal usage means two things happening concurrently, according to Wiktionary, I'd guess that the idiomatic usage assumes that right now is one of the concurrent events.