In nearly 40 years working for The New York Times, Mr. Cunningham operated both as a chronicler of fashion and as an unlikely cultural anthropologist.