The developers have made the game able to remember how much exp and what achievements you have earned while the backend servers are down.
Most likely said system is also able to remember how many units you have earned and then promptly give them to you once the connection to the backend servers have been re-established.
Also due to the fact that achievements give out units when completed, it would be weird for said system not to remember earned units.