I know in American television production there are pilots that are produced, presumably as a proof of concept, for shows that are never aired. Or, alternatively, as with Sherlock on BBC, the released first episode wasn't the originally produced one.
Does something similar happen with anime, or are pilots only produced for shows that will definitely air?