Rooney has had to fly home from United's pre-season tour after the injury turned out to be worse than expected when it was first detected at Carrington.
But Moyes says the England forward will only be out for two or three weeks and will have time to get match-fit before the start of the Premier League campaign.
"We didn't expect it," said Moyes. "We wouldn't have brought him if we had known. But, once we had it checked, what would be the point in taking a risk?
"We could have kept him and taken him to all the other places but he wouldn't have played the games. We thought, for the benefit of the player, the best thing to do was get him back right away and let him get on with his rehabilitation.
"We will keep his work up. With a hamstring injury you can do lots of work in the swimming pool and some work in the gym.
"And, when we return from this tour, we still have the game in Stockholm, the Community Shield and Rio (Ferdinand)'s testimonial as well.
"It is really important we get players fit for those games and Wayne should only be out for two or three weeks.
"He was in really good shape, he came back in a good fighting weight."
Defender Nemanja Vidic is undergoing injections to ease a back problem and it has not yet been decided whether he will join the tour at some point or not.
"He is doing fine," said Moyes. "He is having a course of injections to help his sciatica. If he improves and we felt he was right, we would consider bringing him out later on.
"But the one thing we don't want to do is make it worse by flying him a long way around the world and finding his back has been affected. We have to consider that."
As for Portuguese winger Nani, Moyes added: "Nani had an operation on his nose to clear a bit of breathing.
"At the moment we are not sure if flying is allowed. That is the one downside to it."