Buck originally had the run of the Judge's house and land. He was apparently the favorite of the Judge, and so he didn't have to stay in the house or remain outside in the kennels - he could do what he wanted:
"But Buck was neither house-dog nor kennel dog. The whole realm was his" (page 2 of my copy).
After he was stolen, it took him awhile to adjust to his new life, and he didn't even think twice about wandering into the tent - Why would he after having so much freedom at the Judge's place to go in and out at will?
"...and when he [Buck], as a matter of course, entered it [the tent], both Perrault and Francois bombarded him with curses and cooking utensils,..." (page 17 of my copy).
We're shown that despite the beatings Buck received at the hands of the man in the red sweater, he still remembers his life in the Southland and it will take many more "reminders" before he knows exactly how to behave in this new, frightening world.
Check the links below for more information - good luck!