They were motivated by a bet. She, Percy, Byron, and John Polidori made a bet as to who could write the best horror story in a short period of time. Needless to say that she won since Frankenstein instantly became a classic and is still one of the most important horror stories in literature history.