Sometimes when you are playing a tight musical passage, there isn’t room for the note to fit in, so you have to bend it to make it fit. Sorta like undertakers do when they get a body that’s too tall.
why i bend notes might not necessarily be to get a note to fit any scale at all, but perhaps to break out of a ‘scale-ized’ approach to music making, or maybe to break a pattern of notes by injecting a bit of unpredictability and creativity. for instance a slightly flat shading to a note can put a bit of funk into a tune, especially done randomly.
i don’t think there are any rules that would explain this.
what comes to mind are some great old time itm fiddlers who sort of played that way, some say they had quirky intonation but i’d say they just might be a couple steps ahead of the gang…or maybe behind…