Gates said that at the time, he deferred to advisers inside the Pentagon who argued that the prospect of media coverage could be an onus on vulnerable families.
"I was much happier with the answer I got this year," Gates said.
Gates said there remains a division of opinion inside the Pentagon about whether the ban is appropriate. But he dismissed as "ancient history" a question about whether the ban originated as a public relations strategy.
As of Wednesday, at least 4,251 members of the U.S. military had died in the Iraq war since it began in March 2003, according to an Associated Press count.
As of Tuesday, at least 584 members of the U.S. military had died in Afghanistan, Pakistan and Uzbekistan as a result of the U.S. invasion of Afghanistan in late 2001, according to the Defense Department.
Under pressure from open-government advocates, the Pentagon in 2005 released hundreds of the military's own images of flag-draped coffins from the two ongoing wars, previous wars and from military accidents. The photographs were released in response to a Freedom of Information request and lawsuit.