Why is the inference form “Every X is Y. Some Z is Y. Therefore some Z is X” invalid?
The inference form "Every X is Y. Some Z is Y. Therefore, some Z is X" is invalid because it commits the fallacy of the undistributed middle.1
In a valid categorical syllogism, the middle term (in this case, Y) must be "distributed" in at least one of the premises, meaning the premise must convey information about all members of the class designated by that term. In your example, both premises are affirmative:1
* "Every X is Y" (an A proposition) tells us about all X, but it does not necessarily tell us about all Y.
* "Some Z is Y" (an I proposition) tells us only about a portion of Y.
Because the middle term Y is never used to refer to its entire class, it fails to establish a necessary logical connection between X and Z. Consequently, the conclusion does not follow necessarily from the premises. You can visualize this using a Venn diagram, where you would see that the intersection of Z and Y does not guarantee an overlap with X.12