What is wrong with playing free sometimes really? Do you like to perform or not? Or are you in it for the money wich you are never gonna get? Why would you make the exception when there is a poor turnout, and give your cut to the touring band? Since they are touring, they were headliner probably? If ppl didnt turned up... there is a reason for that, might be the band is not that good they claim to be, or the venue owner or promotor or whatever was to lazy to advertise it..., might be also bad luck, no reason you have to pay for, unless you asked more then you deserve. The touring bands mostly have their shit together already. (i can believe touring is expensive - albums are recorded, cd's and merch is printed, it just needs to get sold)
Image you are headlining a local event, with what you call crappy bands, and then decline to play for free, so you do get paid, but then there is a poor show up (ticket price to high for example - cause the owner needs to pay you), and you are not selling any merch iether. You should rethink your attitude really.
Playing in a band costs money, alot, gear costs money, and its so fun to buy this, but having a 2000 dollar guitar and 4000 dollar halfstack behind you isnt gonna make your songs any better (i am not saying your music sucks, i have no idea what music you play so,...), also think your personal gear purchases shouldnt influence what you ask to play
ps: we mostly get payed, and there is always merch to sell