A standard policy rebuilds what you had
Insurance restores the property to its previous condition. The building department requires current code. The difference between those two, new electrical, new egress, new energy requirements, is not automatically covered, and on an older house it can be a large share of the job.