Why do girls have periods?

Why do girls have periods?