The umbrella is an ancient African innovation and was intended as a portable shade against the sun.
After entering Europe through Spain in the twelfth century it became more valuable as a protection from the rain.
The superstition of bad luck if opened indoors came from the African belief that to open an umbrella in the shade was an insult to the sun god and would cause him to bring down his wrath on the offender.