Why was cardiff castle built in cardiff?

Why in Cardiff? what made William the conqueror want it there?
2 answers 2