The president’s attacks on the Smithsonian Institution and other museums have become an effort to redefine why such places exist.