Why does Wales have so many castles?

The story is more complicated than just "oppressor versus oppressed" says one medieval historian.