Aluminum anodizing is a bit of a weird process, with two important steps.
Clean, prep, and remove all oxide.
1) Sink the part in an acid solution, connected to electricity (this is the anodizing part)
Remove and rinse part. Add dye here.
2) "Fix" the surface.
The mystery is what's happening in those two steps:
In the anodizing bath, the acid is actually etching through the oxide layer, ensuring a constant path from the solution, to clean metal. That way, the electricity flow can be maintained. The electricity, is oxidizing the surface of the aluminum.
So, you've got a battle here, between the electricity, creating an oxide layer on the aluminum, and the acid, removing it.
BUT, instead of that battle being pointless, what really happens, is that the oxides form a porous foam on the surface of the metal.
After some time, the foam reaches a thickness, beyond which the acid will not let it grow, and the part is finished.
Then, after rinsing the acid off, the foam is still quite soft, and porous enough to accept dye of just about any color.
Finally, chemicals are used to change the form of the foam, into something harder, and denser (a less hydrated form of aluminum oxide). Its relatively clear, and the dye is now trapped inside its pores.
BTW, other metals can be anodized (titanium comes to mind), and the oxide layer building up is always the same, but I think the "foaming" is unique to aluminum.