Why was Morocco colonized?

Because of their good water sources on the coast.

No. Morocco was colonized because of its critical position on the Straits of Gibraltar and because of its proximity to Algeria, which was part of France in the early 1900s. The fact that Morocco has plentiful fishing grounds off the coast was not tantalizing to either France or Spain, which have direct access to much the same fishes anyway.