I found something online that says it initially came in vogue because of people wanting to cover up hair loss due to syphilis and persisted for various hygienic reasons but this source is hardly definitive or authoratative.
Wigs definitely didn't last that long - they were worn from the late seventeenth century through the late eighteenth century. You may be interested in my answer to In England 1700s(?) How did the trend of caked face paint, absurdly large dresses and wigs come about?