Olive oil is kept in dark bottles to prevent it from being too exposed to sunlight, which could cause it to oxidate and lose its health properties and taste over time.