Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?

This is hard to answer – you’re asking us to look in the minds of the WP developers who wrote this code 🙂

It is possible that they thought the only place where you need to query for posts of all types is when you are doing a search, and thus they named it that way.

It could be documented more clearly in the Codex. The Codex is a wiki, so feel free to add it yourself!

tech