Several times the writers discussed having Rick leave with Lois/Ilsa, but this was always rejected (and the censors would not have allowed it with her married to Victor). Their major problem was to make it plausible that despite clearly loving Rick, she would leave with Victor; the final scene was rewritten many times until this was achieved.
read more facts...