For the most part, modafinil is used for its ability to keep users awake longer.
Whether this is for treating sleep disorders like narcolepsy or getting a few more working hours out of a long day is up to the individual taking it.
Some users are taking modafinil for the high it produces.