If I am missing the irony you are alluding to, please help me to understand.
There’s more than one if you recall the context of the parable.
The priest and Levite had the law on their side. They both had a reason to walk by, as touching a stranger who could be dead would’ve rendered him unclean for a week (see Leviticus). But the Law also allowed for exceptions, and a way to get clean again. So the avoidance of the likely inconvenience was unnecessary.
If the Levite was following his priest he’d have correctly surmised that if a priest couldn’t risk it, neither should he.
The Samaritan was a marginalised figure more likely to be presented as the bad guy in a story. But he wasn’t constrained by the barrack room lawyering of the priest.
He was free to look at the need to intervene, then accepted the inconvenience and took the financial hit. Because it was the right thing to do, and sod the rules.
“Go and Do likewise”, said Jesus.
This is the same lesson implied by the two points Jesus makes back to back (the example set by David, and tending to a trapped sheep on the Sabbath) In Matthew 12.
In other words, the choice of protecting the innocent and saving people from starving rather than obsessing about the legality of it is a test of compassion and is far more important than one’s ability to stick to the rulebook.