The market value of the home is not always equal to the cost of rebuilding the home. The market value is determined by many more factors like the time of year you buy, what neighborhood you are in, etc. If you buy a home in California and the market value is $1 million, it typically will not cost $1 million to buy materials and pay for labor.
The point of insurance is to return you to where you were before the loss occurred. So insurance companies will pay for the materials and labor to build the same house you purchased, with the same kinds and quality of materials you had before the loss.
This can also be a positive for you because the higher the coverage, the more the policy will cost.