From the very opening of The House of Spirits, when we're presented with the image of a caged puppy, the reader is invited to contemplate the themes of freedom and confinement. Barrabás's confinement may seem like a small offense, since he's a dog, but as the novel progresses we see greater and greater impediments to human freedom, culminating in Alba's imprisonment in "the doghouse." While some characters maintain that they're limiting the freedom of others for their own good, the author's message is pretty clear: people, and animals, need freedom in order to be happy.
Although some characters argue that the restrictions placed on others are for their own protection and well-being, freedom is always presented as more ethical than confinement.
The confinement of animals in The House of the Spirits hints at the eventual imprisonment of people, and provides a critique of the treatment of living creatures both prior to and following the imposition of military rule.