You also may have to pay for the anthology, unless it specifically says in the rules that contributors receive a complimentary copy. Purchase may not be compulsory, but it's difficult to resist at least one copy of your own work in print. This is particularly true if it's a limited print run edition which won't be available later. It's this need to see our work in print that funds the competitions, of course, and which makes the anthology production viable. But appearing in a pamphlet which only sells a couple of dozen copies to contributors is unlikely to further your writing career nor increase your prestige in the literary world.
Many smaller contests recoup their costs by charging entry fees .
Some writing groups will put the profits into group funds, others make donations to charity. No doubt others would rather we didn't look too closely at the accounts. After all, it's easy to see that even 100 people paying a 2 entry fee more than covers the prize monies and printing costs involved with most small competitions. There are also some major literary contest scams being run at the moment. These don't always charge entry fees, but they will get your money from you somehow.