I can't find when the law was first enacted, but considering that 40 states have programs like this I don't think it was a reaction to that. I know the law has been in place since at least 2015, since that's when a CNN article written about a different person (in FL) experiencing the same was written.
To be clear: this isn't a defense. It's all awful.