Tax Due ?

I am over 65 filling out a 1040 SR for Tax year 2018. After filling out the form I get a refund of 3 dollars, now my question is..when I enter my gambling winnings of over 5,000 dollars then I subtract the same amount for loses, why do I get a tax due ?