B. Because of the gravitational pull of the moon and sun
Tides are primarily caused by the gravitational forces exerted by the moon and, to a lesser extent, the sun on the Earth's oceans. This pull creates bulges in the water, leading to high and low tides as the Earth rotates.