Any organic material can be attractive to dogs, who have been known to consume it in very large quantities. Depending on what's in the compost and how it's processed, it's possible that certain molds or other potentially harmful components are present. Homemade compost may contain spoiled foods, coffee grounds, plants and other ingredients that make great mulch for gardens, but are potentially hazardous material for pets. Since you're using pre-mixed compost, it's difficult to assess unless the label provides a specific breakdown of ingredients.
Aside from the possible risk of bacteria, toxin-producing molds or other harmful material, eating compost can also pose a choking hazard or lead to stomach or bowel obstruction. The bottom line? It's best to discourage your dogs from munching on compost.