@cwilbur i do agree with you on two points.
first, programming is not necessarily the best way to develop analytical and logical thinking. personally i think i became a better developer because first i learned to develop proofs in geometry and trigonometry classes. in fact, many things clicked into place after i took those classes.
second, it’s unfortunate that there are way too many untalented people in the programming business. this situation was of course driven by the huge demand for bodies which resulted in compromising requirements for entry and continued participation in the field. this trend has not yet reversed, imho
so to answer the question directly, an elective yes, requirement no.