Because after the rain shower the water droplets work as small prism that"s why the sunlight makes rainbow always curved.
There are drops of water in the airThere is sunlight coming inThe sunlight, the drops, and you form a certain angle.
There are more details involving the way water reflects and refracts light, but the basic point is that the rainbow is due to light from the sun and water in the sky at a given angle.

The shape of the Earth doesn't come in to it because the Earth isn't involved in the process. It only involves sunlight, water, and your eye. So there's no reason that the Earth being flat or curved ought to change the shape of a rainbow.

The reason a rainbow is circular is that a circle is the set of all points in the sky that make the same angle between you, the water droplets, and the sun.