Rick and Ilsa used to be lovers in the past.
Rick: Of all the gin joints in all the towns in all the world, she walks into mine
Rick: We'll always have Paris. We didn't have, we'd lost it, until you came to Casablanca. We got it back last night.
Furthermore, Rick was still "carrying the torch" for Ilsa, as he had forbidden Sam (his pianist) to ever play the song "As Time Goes By" - which was song that reminded Rick of Ilsa:
Ilsa: Play it, Sam. Play "As Time Goes By"
Sam: Oh, I can't remember it Miss Ilsa. I'm a bit rusty on it.
Ilsa: I'll hum it for you
(Ilsa begins humming. Sam begins to play.)
Ilsa: Sing it, Sam.
(Sam begins to sing)
(Rick walks briskly up to the piano)
Rick: Sam, I thought I told you never to play...
(As he sees Ilsa, Rick stops short. Sam stops playing.)
Why did she want to fly with Rick? Didn't she love Victor for a moment?
So reconnecting with Rick after all these years, and seeing that he still pined for her, awakened old feelings from that past relationship. She still loves Victor, of course, but love isn't a binary switch that turns off for one person as soon as they meet another. It's complicated.
In the end, she goes with Victor after all.