Dogs can bite because they are scared or have been startled.
They can bite because they feel threatened.
They can bite to protect something that is valuable to them, like their puppies, their food or a toy.
Dogs might bite because they aren't feeling well.