I’d be surprised if it is illegal; a long time ago I told my children that our home is private and they shouldn’t discuss it at school. I basically told them at an early age that teachers are spies for the government.
But you sent them anyway? That's the part that's mind-boggling to me...
We told our children to respond to questions about home life, gun ownership, etc by saying, “you need to ask my parents about that.” My plan if ever asked has always been to turn it back on them. They ask, “Do you have guns in your home?” I reply “Do you?”, with a smile.