When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
Maybe the In-Laws: https://tvtropes.org/pmwiki/pmwiki.php/Film/TheInLaws
Or Something Wild: https://tvtropes.org/pmwiki/pmwiki.php/Film/SomethingWild
I think Rain Man is maybe not the best example, as card counting is neither illegal nor immoral, it’s just breaking the rules of a private establishment. Charlie’s main immorality is towards Raymond, because he’s using him to make money.
“Everything I do got to be funky.”

Hi! Can you tell me examples of films, comedies and any kind of stories in which a protagonist who blindly follows the law is partnered with a criminal-minded sidekick expanding their worldview? and where the idealist character is dragged like an unwitting pawn from the chaotic neutral street-smart manipolative bastard to a series of illegal criminal acts?
I can only think of of Training day (even if they're both cops the pattern is kinda the one I'm looking for), the Italian classic Il sorpasso (but with not enough illegal stuff, just amoral), the robot in Short circuit 2, deceived by a gang into stealing (I found this example looking for something similar on your site), and maybe the scene where Tom Cruise brings his brother to the Casino to count cards, which is illegal, in Rain man. Thanks!
https://tvtropes.org/pmwiki/pmwiki.php/Film/TrainingDay
https://tvtropes.org/pmwiki/pmwiki.php/Film/IlSorpasso
https://tvtropes.org/pmwiki/pmwiki.php/Film/RainMan
https://tvtropes.org/pmwiki/pmwiki.php/Film/ShortCircuit