There's even a credible suggestion that not only is Bergdahl a deserter, but possibly a collabarator.
Report: “Many” in intelligence community fear Bergdahl may have been an active collaborator with the Taliban « Hot Air
Generally speaking I don't think it's a particularly good idea to hand over high level prisoners for a low level deserter but that's another issue all together.
It looks like congress was trying to infringe on the presidents powers through the defense budget bill. If the GOP doesn't take Obama to court for breaking their law, then I think it safe to assume the statute is probably unconstitutional. Besides I think it's to the GOP's advantage that the court doesn't decide the case because it allows them to continue to falsely accuse Obama of breaking the law. See how that works? lol
Apparently the law was wide open for interpretation and the president determined that parts of the statute were unconstitutional and infringed on the separation of powers. If congress disagrees then let the courts decide... after all, that's what they're for.