But it does seem to require generosity. Think of the soldier, who is allowed to compel me to go 1 mile. I am required to go 2 miles.
The other example, with the cloak and the tunic/shirt, is more outrageous. The cloak, the himation, functioned as a coat, a blanket, sometimes a shelter for the poor, and you could not legally take it away from someone, at least not overnight.
“If ever you take your neighbor’s cloak in pledge, you shall return it before the sun goes down.”
— Exodus 22:26
So this verse imagines them doing something outrageous, taking away your shirt/tunic, the garment closest to your skin instead. And if they do, it says to give them your cloak as well. That sounds more like cleaning out your bank account.
I definitely wrestle with this. I usually try to give a little generously, but a lot depends on the situation.