I think it is presumptive to assume the question was not genuine. It may not have been but there is no way for anyone to know that.
The younger generations seem to have dispensed with the notion of polite behavior in the face of a loss by death.It's not rocket science to avoid a stupid question on a thread immediately announcing a death of a child. If you're not sure about saying a thing, keep your mouth shut out of respect.