no such thing as safely riding on a flat, only managing to. a flat tyre will very quickly disintegrate and throw bits of rubber everywhere, leaving you running on the rim. and thats without the rim damage your gonna do without the tyre/tubes cushioning effect. you sit on a bike with anything but the stiffest side wall tyre, with no air in it, and the rim will go to the ground. add rocks and potholes to that?
tubes are used because they are the simplist option. a dirt bike wheel need to be spoked. spoke nipples aren't air tight (i have seen some BMW and Moto Guzzi attempts but they dont wear well enough to go mainstream). if you get a puncture with a tube, you change tube move on. you get a puncture in a tubeless and you sitting around waiting for glues to dry, you have to be careful on the repair incase it moves and starts to leak again.
tubes allow you to (generally) run lower pressures safer (resistance in the tube helps hold bead on).
if you have to right tyre/tube combo and run the correct pressures you'll very, VERY rarely have an issue. my family's been running this dealership for 20 years and racing for longer and the only flats we ever get are if you're unlucky enough to pick up a nail or a few crash damages. (Had a pinch flat 3 weeks ago when the brother in law hit a 6" round tree 8" off the ground @ about 130kph. instead of |___| the rear rim ended up _____ will have to up some pics when we start the repair job.