My home computer does that (a PC laptop). Sometimes it'll take multiple attempts (I'm talking 10 or more), sometimes it'll work the first time.
Unplugging USB from computer and turning on phone (unlocking), connecting cable to phone, then plugging unlocked phone and cable into USB on laptop usually gives me the best chance of it working. My home laptop has 3 USB's, and neither work any better than the other, plus, like you said, photo import pops up, so computer recognizes something is plugged in.
Anyways, I have no idea why this problem persists. I've had this issue for a couple years now lol. It's at the point now where I don't even try. I think the last time I plugged my phone into my computer was 6 months ago, and even then it didn't connect to iTunes. I just pulled all my photos off to save them.