When the wipers do a few swipes of the screen, either by using the screen wash or if it is raining, the headlights will come on by design.
Once the wipers stop, if it is anything other than dusk type conditions, the headlights should go off after several minutes. The delay is to stop them from cycling in drizzle.