Pelvic or genital pain is a perfectly good reason for the doctor to order a pregnancy test. The test is cheap and simple, and rules out a whole diagnostic area in one fell swoop without the doctor having to rely on the patient's report of the situation. (Patients can be wrong, lying or mistaken. Tests give the simple facts. A pregnancy test coming up positive is the way some couples learn that the man's vasectomy is no longer 100%.)
If the doc ordered the usual gamut of tests for pelvic pain, it's also possible that he or she didn't bother to mention that a pregnancy test was on the list. (A friend went in for routine surgery. They came into pre-op and told her they were cancelling the surgery because she was pregnant. The surprise was made more complete by the fact that she hadn't even known they did a pregnancy test in the run-up to the surgery. Some things are just standard.)
I say all of this because you're wondering if there are legitimate reasons a doc would order a pregnancy test despite your vasectomy that don't suggest your wife is cheating, and there are plenty of good reasons. But you also sound like you have an intuitive sense that it's at least a possibility. If you and your wife have issues, ask how the doctor's visit went and if they ruled anything out, and how she's feeling, and try to crack open the lines of communication a bit while leaving the suspicion on the back burner. I'm not saying you're wrong, but in your shoes I would be careful about leaping to conclusions.
Good luck to you both. I hope your problems become fewer and things look brighter for you soon.
Did you ask your wife or your doctor?