Why OS X never ejects drives before shutdown or suspend mode?
I will share a why it is good to have it as is and a way around it if you are determined. 


  When you put the Mac to sleep, it will try and also put the external
  drive to sleep, thus parking its heads and turning off the drives. It
  won't eject it, however, so you can use it as soon as you wake your
  Mac again without having to mount it.
  
  The benefit is that you don't have to worry about mounting it, as in
  most cases this would involve turning the drive off and on again,
  reconnecting the plug, or using diskutil from a Terminal—quite time
  consuming. Since I use my drive for Time Machine, I don't want to have
  to think about connecting it every time I wake my Mac.
  
  The only downside I see is that you could accidentally plug the drive
  out. In that case, the Mac will wake up, and show you the error about
  a drive being disconnected without properly ejecting it. Since all
  data is written to the drive before going to sleep, this shouldn't
  cause any data loss though.
  
  All in all, it's much more comfortable to just keep the drive mounted.


If you want to unmount the drives before sleep:


You can use the automator > files/folders > eject disk > tell it when
to eject.
Use terminal to unmount all drives before sleep. &lt; not comfortable giving you the code as it can vary.