Flavor is only half the story.
The herb's also a natural preservative, and in the days before refrigeration, vegetables were often pickled in vinegar or brine to keep them from spoiling. When dill was added, the pickled vegetables lasted even longer. The same components in dill that helps keep pickles fresh can also soothe an upset stomach. The use of dill as a digestive aid isn't new. The ancient Egyptians, Greeks, Romans and Chinese all used this herb to cure tummy troubles.