Brittney Griner was a celebrity stuck in a political dispute, Whelan is a totally different case. I don't think he was spying for the CIA, but he was up to some pretty sketchy stuff, and he has an even sketchier past.
He's claimed to work as a police officer in multiple places that say they have no record of him, or that he only worked there for a short time. He was court marshalled for larceny and given a bad conduct discharge. Even after his discharge he was hired as head of security for a global firm that did business in Russia. Even ignoring the fact that he holds like 4 different citizenships, just the information that he has provided himself is super sketchy.
I wouldn't be in any rush to to spend political capital on this dude either.
At least that has some return on investment, that's if you're looking at it from the perspective of a politician.
Though I do find it pretty hypocritical that he spent that capital freeing someone from a crime that he himself is perfectly fine sending people to jail for in America.
But you know who she is....... I'd say it's pretty self evident that it was fairly effective PR.
Reality doesn't matter, politics revolves around perception and fabricating the PR story you want.
"President saves famous female athlete from tyrant" is always going to be a net plus. The people who don't agree or perceive it in a different fashion are either votes you wouldn't win anyways, or people who don't care about it enough to vote for someone else because of it.
Eh, I really don't think many people are saying "I wasn't going to vote for Biden, but he freed Brittney Griner." And there are surely others who think Biden was wrong for trading an arms dealer for a WNBA "star."