Beagles are a hunting breed, and howling is their way of telling their hunter that prey has been sighted or caught.
A beagle's howl can be bigger than he is, capable of carrying quite a distance.
If there's no prey to be spotted in your house, a beagle will find other reasons to vocalize.
howling makes a beagle happy.