you are insecure because of information, knowledge and observations that he may be cheating on you. Stimuli received during the day triggers your brain to process that data, to become information. Your subconscious may suspect him of having a girlfriend, and invented the dream to warn you.
If you have evidence that your husband has a girlfriend, then your dream merely repeats your information, to remind you and stir you into action.