... Of course, negligently leaving your child in a grocery cart in the hot sun is not the same as soliciting a minor for sex, but the societal interest in protecting children is the same.
Fortunately, the law recognizes that the gravity of these two scenarios is quite different and the punishment or level of offense affixed to both is quite different; one is a class 3 felony the other is a misdemeanor.
The point though is that society has an interest in protecting children and both offenses are appropriately criminal and punishable.