Raining “cats & dogs”

Where did this expression come from?
In Europe you’ve probably seen the pictures of the homes that
had thatched roofs.  The folks knew the left over hay could
provide insulation to stay cool in the summer and warm in the winter.
They would use the hay to thatch their roof and  recycle but
it also provided practical benefits.