Sex and IUI?

Heather

Im confused why you are supposed to have sex 2 days before IUI then the day of IUI and 2 days after ? why would you do that if they are going to inseminate you?