The cost of making the Mars Curiosity Rover was $2.5 billion, as stated by NASA. This includes the money spent for launch and operations as well as scientific research and spacecraft development, which came up to $1.8 billion.
The key purpose for making the Mars Curiosity Rover was to study the planet Mars' habitability potential and history. This was done by analyzing various soil and rock samples on the planet. After the rover's landing on Mars in 2012 and some scientific analysis, one of the conclusions by its scientific team is that Gale Crater once had a huge amount of water. Scientists cannot specify when or how long the water was there, but the finding is sufficient to indicate that the planet could potentially sustain life.