The Martian is an outlier in its success, but it's far from the only instance of successful self-published sci-fi. Recent examples I've read include The Powers of Earth[1] by Travis Corcoran and Theft of Fire by Devon Eriksen. In both cases, the authors quit their day jobs (I think both worked in software) and are now full time writers.