"We don't leave men and women in uniform behind," he said during a news conference in Warsaw, Poland, on Tuesday.
Five Taliban prisoners in U.S. custody were transferred to Qatar, where, Obama said, he is confident that they would not endanger U.S. security because the Qataris will monitor them closely.
Bergdahl, the last American soldier held captive from the Iraq and Afghanistan conflicts, is at Landstuhl Regional Medical Center in Germany, where he will remain until he completes his treatment, a U.S. defense official there told CNN.
After that, he'll return to the United States and go to a San Antonio military base, the official said.
"This is what happens at the end of wars," Obama said of the prisoner swap. "Regardless of the circumstances, we still get an American soldier back if he's held in captivity. Period."
But not all share the sense of pride about the deal that released the prisoner of war.
Many of those who served with Bergdahl call him a deserter whose "selfish act" ended up costing the lives of others.
According to firsthand accounts from soldiers in his platoon, Bergdahl, while on guard duty, shed his weapons and walked off an observation post with nothing more than a compass, a knife, water, a digital camera and a diary.
At least six soldiers were killed in subsequent searches for Bergdahl, and many soldiers in his platoon said attacks seemed to increase against the United States in Paktika province in the days and weeks after his disappearance.
A reporter asked Defense Secretary Chuck Hagel on Sunday whether Bergdahl had left his post without permission or deserted -- and, if so, whether he would be punished. Hagel didn't answer directly.
A senior U.S. defense official told CNN there was an Army fact-finding investigation in the months after Bergdahl's disappearance. The report discusses the likelihood that Bergdahl left under his own free will.
But the commander who signed the report apparently indicated the door had to be left open for final conclusions until hearing directly from Bergdahl, the official said.
Bergdahl is yet to be interrogated by U.S. officials because is still undergoing medical care, Obama said at the news conference. The President added that Bergdahl has not met with his family, either.
The questions about the circumstances of Bergdahl's capture in Afghanistan were immaterial to the U.S. government's efforts to get him back, Obama said.
"Whatever the circumstances may turn out to be, we still get an American soldier back if he is held in captivity. Period. Full stop. We don't condition that," he said.
It will be up to the Army to decide if they want to reopen the investigation officially.
Obama was asked why Congress wasn't consulted over the prisoner exchange. The President said that over the years, the White House had talked with Congress about the possible need for such an exchange, and that officials had to move quickly when the opportunity arose.