The primary purpose of halving is to control Bitcoin's supply, ensuring it remains finite with a maximum cap of 21 million coins. Halving affects Bitcoin by potentially increasing its value over time due to the reduced supply of new coins entering the market, aligning with the principles of supply and demand.