The droid was not simply a prop for one movie, but has been assembled from components used in numerous films. This R2 unit is comprised of parts from the "original trilogy" Star Wars episodes 4, 5, 6; as well as the "prequel" episodes 1, and 2. Those films span a length of time from 1977 to 2002.
Constructed of aluminum, steel, and fiberglass, the droid has "no internal mechanics or workings" according to the auction house. So, this R2-D2 won't be rolling around or whistling at guests, but the hefty price tag is due to the droid's history. The piece's dome is from the original 1977 Episode IV unit. R2-D2 units were upgraded over the course of the films, with newer parts being added and older parts getting retired.
Although R2-D2 was the most expensive piece at the auction, there was another standout prop. Luke Skywalker's lightsaber from A New Hope and The Empire Strikes Back was purchased by some wealthy jedi for $325,000.
Image: Star Wars: Episode IV - A New Hope (1977)