Sex to induce

How exactly does sex help induce labor? I know either way baby is coming when baby is ready though lol