Clomid alongside HSG test

My OB rx'd clomid, he said he liked to prescribe it during the same cycle as an HSG test (suspected endo).  Didn't think to ask why until I got home.  Anyone else have this?  Why would those 2 things be important together?  Based on OPKs & temps I'm ovulating, so it seems kinda weird!