What could cause the camera to turn on automatically while the phone is in standby?
Not exactly a solution, but this seems to be part of the problem:


  Launch Camera directly from lock screen
  
  Time is often of the essence when trying to capture the perfect
  picture. The Galaxy S5 lets you bypass the lock screen to snap a
  picture. Simply swipe the camera icon up (in the lower right hand
  corner) and you’ll launch directly into the camera app! If this
  feature isn’t turned on you can do so by:
  
  Go to Settings > Lock Screen Check “Camera Shortcut” You’re done! Even
  if you have a pattern or password lock set up this will let you take
  pictures without unlocking your phone.


How this is being enabled is anyones guess.