You are right in that namaz is not the only way to get closer to Allah, but it does supercede everything, so much so that if you’re namaz is accepted, all your naik amals will be, if you’re namaz is non existant, then where does that leave your good deeds?
When it comes to choosing a spouse, we have every right to judge the suitability of a person on things that actually matter, and when namaz is a core pillar, you would have to be really daft to dismiss it. Sure, its is not he ONLY thing you look for, but it is just as significant as education/character/personality etc.