Why doesn't it rain in summer and winter in California, USA

California is located on the west coast of the mainland, 30-40 degrees north latitude. At 30-40 degrees south latitude, the west coast of the mainland is alternately controlled by the subtropical high zone and the westerly belt, resulting in a Mediterranean climate characterized by high temperature and dryness in summer and mild and rainy in winter. Such as Rome, Athens, Cape Town, Los Angeles and San Francisco.