Rick's substitution of Louis for Ilsa at the end of the film underscores the idea in Casablanca that politics trumps romantic love - that the 'public' is of greater significance than the personal.
Rick's and Ilsa's true feelings and motives in the climax of Casablanca remains a mystery. It is neither happy nor sad... But both at once.