"You mention the theory that yews were planted in church yards to keep them away from cattle. Why plant them at all?"

Who is to say that anyone did plant yews other than in landscape gardens, yew walks and so on?

Imagine a number of yews growing in an area. Forget them being planted for bows as it would take too long for a sapling to develope heart wood strong enough. Then, long after the longbow era, with the increase in livestock, enclosures etc , more land is cleared and poisonous yews are grubbed up - leaving those which are growing safely behind churchyard walls where cattle can't eat them and landowners can't clear them.