The 505 dates back to being one of the original area codes established in 1947.
Due to the demand for new numbers, the 575 was created in 2007. It actually covers more of the state, but the areas with higher populations are still under 505.
Still, the state had one area code for so long that "The 505" is considered a slang term for New Mexico.
|Picture from Wikipedia|