That's because the meanings are partially overlapping between those two words. For instance, 気持ちが悪い can be used also for "to feel sick", and 気分が悪い can be "to feel bad mentally". Actually, the difference is a bit hard to summarize, and furthermore, there is one more similar word 機嫌...