The dog is given as a pup by the main protagonist, Tomas, to his wife, Tereza—for the very same reason, we are told, that he married Tereza: to make up for the pain and humiliation his incorrigible womanizing causes her.
This is still a Tomas hate account