are they illegal? if so why would they sell permits to allow you to operate?
There are narrow exceptions to the gambling statutes in Texas but odds are this situation runs afoul of the Texas Penal Code and is therefore illegal.
To quote Texas Attorney General Greg Abbott, "[a]lthough the State’s gaming laws may seem complicated, the prohibition [against gambling] basically boils down to this: It is illegal to charge someone for an opportunity to win a prize that is decided on the basis of sheer chance." (See Office of the Attorney General, "Sweepstakes Cafés Lose Gamble against Texas Laws", Oct. 9, 2012) (available at www.oag.state.tx.us/alerts/alerts_view.php?id=278&type=3).
If that is happening, or the sweepstakes entry fees are in any way tied to the winnings, then you have an illegal gambling situation.