capriciously

adverb
  1. in a sudden and unpredictable way; without apparent reason or logic

Examples