Lukewarm people don’t really want to be saved from their sin; they want to be only saved from the penalty of their sin. They don’t hate sin and aren’t genuinely sorry for it; they’re merely sorry because God is going to punish them.
Anyone, then who knows the good he ought to do and doesn’t do it, sins (James 4:17).