This drove me crazy.
I upgraded my Mac to El Capitan and (for reasons I won't bore you with) decided to reconfigure my external drives (WD Passport Pro). I found that they would keep dismounting themselves after a few seconds. I researched this extensively and found one hint - they get dismounted when you run the WD Drive Utilities that I had used to reconfigure them. Sounds reasonable - except that after quitting the application and even rebooting the problem came back straight away.
El Capitan = Red Herring. You think the WD Drive Utilities is not running, but it is. Upon installation and every time you run it, it places itself in the list of helper applications that launches in the background at logon time.
As you can see, it is listed here. Checking the box to hide it will not help, you must highlight it and hit the '-' button and get rid of it. Remember, it will come back anytime you launch the application.