Why did Ronald Reagan wear a Nazi uniform?

Ronald Reagan was an actor before he was a politician, and he wore a Nazi uniform for a role in a movie. Reagan was the 40th U.S. President.