I had gambling winnings and losses. which netted out to zero, but the winning still appear as part of my taxable income. Why is the net is zero?

why isn't the net zero? For example, if my taxable income is 10,000 and my gambling winning is 2000 and my losses id 2000 why is my taxable income now 12,000?