In this piece, which is essentially chromatic, it's used as a passing note. Something needs playing in that place which otherwise might be a space, so the note between two 'good' ones is played.
If you're asking specifically about that blue note it's just as often heard in major. Minor is a red herring. In fact, in blues, there are three notes which get used to make blues sound authentic. b3, b5 and b7. No-one said 'These are the notes which shall be used', they were the notes which happened to make a bluesy sound out of some diatonic melodies. The b3 in major is 'sweet and sour', the b5 is tritone to the root, and while it's being played, it's just between two really good, stable notes which will fit - the 4 and 5 of the key. Which way will it go? And b7 is so well known, it doesn't need explanation here.