It is only legal in a handful of states, usually those with insane quantities of feral pigs.
In a lot of the US, it would be illegal. However in Arkansas where the person in question was, it was legal on private property.
In nearby Alabama or Louisiana you need a permit, likewise in California. So in those states it would have been illegal. In Arkansas, Texas, or Oklahoma, there's no permit.
In Texas, it's legal on public property even. Texas has a feral pig population nearing 2m, which causes almost (supposedly) half a billion dollars in damage annually. Or $50m. Or a billion. It depends on the study.
I think this relates to the specifics of the situation.
If you're on farmland, and you've ensured your family is in a safe place, it's pretty safe. The danger -- as I mentioned in a previous comment -- is that this kind of situational awareness is a perishable skill. If it's not being practiced (ideally by all parties involved), it's easy to make mistakes. It's definitely not like riding a bike.
... but if is legal in US, is legal. Definitely unwise in any case.
If this is a concern in some areas, just a small stone wall around the kids's playing area would deter the pigs to enter. They do not jump very well.