He wants to investigate but can't, or he's scared and can't get away, or he's too cold, or too hot. Even solid fences can't screen out all the threatening stimuli. And most dogs eventually find a reason, and a way, to get out of the yard, often ending up lost, injured or killed. A house, on the other hand, keeps most, if not all, stimuli to a minimum. Is also serves as an almost fool-proof way to keep your dog from getting loose.
Outdoor dogs live under yard rules.
They can dig, bark, and eliminate whenever they feel like it. All these behaviors are undesirable. But this is what the outdoor dog is actually being taught, even if only in the yard during the day. Although the house should be your dog's living space, a fence does have its place. Without the fence, someone would have to supervise the animal at all times.