The school districts enforce school attendance because they get money from the government based on how many school children actually show up for class.
Usually, for a "first offense" of this kind, you get some kind of probation - involving parenting classes and other indignities.
The basic law about this situation is found in the Texas Education Code sections 25.085, 25.086, 25.093, 25.094, and 25.095.