Another way to say "visiting a museum is for education" is "Educate may be the purpose of a visit to the museum."