This figure of speech comes from what Jesus said: ‘if someone asks your shirt of you, give him your cloak also’. The figure of speech is used like this: ‘I gave him the shirt off my back.’ In other words, I gave everything I could (maybe more than expected, or more than reasonable). They asked for the shirt off my back’.