Some adults that have inappropriate relationships with minors may have their own childhood or mental illness to blame. If they were sexually abused, they may become adults who have inappropriate relationships with minors. Also, mental illnesses can play a major role in people acting badly, they may need treatment/medication.
Although it is illegal to have these kinds of relationships, some adults may psychologically feel like they are younger than they really are. There may be a chance they were abused as children, and they're carrying out the same behavior, thinking it's not wrong. Or even being completely aware of the circumstances, they find it arousing.
There's a lot of explanations to this, most not scientifically or psychologically proven, but the most common one in the psychiatric world is simple: Power. The adult is not really interested in the child in any sexual way (I assume this is what you mean by inappropriate), but they feel they need to exert power over someone; kids are easiest.