NCAA uses a scoring system for at-large teams that is based on head-to-head competitions with other teams vying for spots at Nationals. Villanova men did not go to any national-caliber meets (e.g., Pre-Nationals) this year, opting instead of compete only locally (Big Five, Main Line, Paul Short, Princeton, Haverford, Big East) prior to Regionals. At those meets, they were 0-3 versus Georgetown and 0-3 versus Penn. They had no wins versus any contending school. As a result, despite being a good squad, they failed to merit an invite to Nationals. No points = no invite.
On the other hand, the VU women, despite being comparatively weaker than then VU men, went to Pre-Nationals and -- despite a 10th place finish there -- actually beat a contending team or two. So, despite coming 4th at the NCAA Regional, the women had a few points/tie-breakers and squeezed into Nationals as the last team in. If the men had gone to Pre-Nationals and had run to form, they'd very likely be going to Nationals, even if everything else stayed the same.
The bottom line is that the Villanova men adopted a risky strategy of not going to a big-time meet and it came back to bite them. That being said, who could have predicted that Penn would turn out to be as good as they are? My guess is that the VU coaches predicted that the Mid-Atlantic region was a 2-horse race (Georgetown + Villanova) and that VU would get to Nationals even if Georgetown beat them at NCAA Regionals. What they did not anticipate was that Penn would be this good and make the Mid-Atlantic region a 3-horse race -- with Villanova the third horse!