It is incredibly important to properly store garlic so that it does not go bad. Typically raw garlic only lasts for a few days, even less if it is not properly stores. If raw garlic is not stored properly, it can develop dangerous bacteria that can be harmful for the body.
This is why it is so important to make sure that you keep your garlic in the refrigerator or freezer until you want to use it. This way you will be able to avoid having your garlic go bad and potentially ingesting some very harmful bacteria that can form on it over time if it is left out for a while.