The Swiss, seeded third, was due to play lefthander Beck on Hisense Arena but the 25-year-old was forced to pull out with a lower back problem.
Federer said his opponent had told him of the problem in the locker room.
"He said, 'I'm not so good actually. I have a bad back'," Federer told reporters. "It came as a surprise. He said he had a lot painkillers and pain during the last match. I think it happened four, five days ago.
"He doesn't want to risk it early in the season, best five sets against me.
"Nothing he could have done, even though he would love to play against me. I guess it's the only smart decision for him to take."
Federer, targeting a fifth Australian Open title at Melbourne Park, will meet either Croatia's Ivo Karlovic or Argentine Carlos Berlocq in the third round.
The withdrawal spared Federer a first match away from Rod Laver Arena since he met Jeff Morrison in the second round in 2004.
"I was excited, I wasn't disappointed to be playing on Hisense to be honest," said Federer, whose subsequent 52 matches taking place on the main show court.
"At Wimbledon and at the French we always go (to) the second court.
"It's just here and at the U.S. Open with the night sessions they have ... more space for men's matches on the centre court.
"But when the draws are such that me and Rafa are in the same section, and you have (Bernard) Tomic, I guess, I expect it to happen.
"When I saw that Rafa played an Hisense the first day, I expected my second round match was going to be there too.
"I would have loved to play (and I) feel sorry for the fans who were excited to see me on Hisense today. I was ready to go."
Men's second round results
21-Stanislas Wawrinka (Switzerland) beat Marcos Baghdatis Cyprus) 7-6(3) 6-4 5-7 6-1; 10-Nicolas Almagro (Spain) beat Grigor Dimitrov (Bulgaria) 4-6 -3 6-7(4) 6-4 6-0; Bernard Tomic (Australia) beat Sam Querrey (U.S.) 3-6 6-3 7-6(3) 6-3; Ivo Karlovic (Croatia) beat Carlos Berlocq (Argentina) 7-6(4) 3-6 6-3 6-4; 13-Alexandr Dolgopolov (Ukraine) beat Tobias Kamke (Germany) 4-6 6-1 6-1 3-6 8-6; 16-John Isner (U.S.) beat David Nalbandian (Argentina) 4-6 6-3 2-6 7-6(5) 10-8; Lukas Lacko (Slovakia) beat Donald Young (U.S.) 6-3 6-1 3-6 6-3; 2-Rafa Nadal (Spain) beat Tommy Haas (Germany) 6-4 6-3 6-4; 3-Roger Federer (Switzerland) beat Andreas Beck (Germany) Walkover; 11-Juan Martin Del Potro (Argentina) beat Blaz Kavcic (Slovenia) 6-4 7-5 6-3; 18-Feliciano Lopez (Spain) beat Flavio Cipolla (Italy) 7-5 7-6(4) 6-2; Alejandro Falla (Colombia) beat 8-Mardy Fish (U.S.) 7-6(4) 6-3 7-6(6); 30-Kevin Anderson (South Africa) beat Sergiy Stakhovsky (Ukraine) 3-6 6-1 7-6(3) 6-3; Lu Yen-Hsun (Taiwan) beat Florent Serra (France) 7-5 6-2 6-2; 7-Tomas Berdych (Czech Republic) beat Olivier Rochus (Belgium) 6-1 6-0 7-6(4) Philipp Kohlschreiber (Germany) beat Pere Riba (Spain) 6-0 4-0 (Riba retired).