I'd quibble: I'd say it's not the "sole purpose" but it should be one of the primary ones.
Note that both statements are echoes of one of Henmingway's famous lines: "The most essential gift for a good writer is a built-in, shock-proof, shit detector."
And it's why I've never been keen on core curriculum. In my estimation, such requirements do little to achieve that purpose. Sorry, American Council of Trustees and Alumni.