I'm thinking your post is about bare metal or "close to the machine" performance programming vs modern API abstraction layers, interpreted languages, etc. If that's the case then the answer is both have their merit based on what you're doing.
I use dos nearly all the time for programming. There is a lot of intrinsic value depending on what you're doing, just be aware of what is relevant and what is not and try not to dote on the things that are useless today (like spending 100 hours learning how to use the graphics library in the ms c/c++ compiler, just think of those things as black boxes if you even need to use them and focus on what you're trying to accomplish / learn).
Games: For fun I've spent nearly the past year writing my own full game graphics (and now sound) engine in MS-DOS (not complete yet). It's been incredibly rewarding going through all of the good old works like Foley's Computer Graphics, Michael Abrash's "Zen" books, and a bunch of others. Having compilers relevant to the time period made some of the books super easy to follow, and I didn't have to bog myself down by learning DirectX or a gigantic software IDE/compiler suite in the process, it allows you to focus on the meat of your algorithms/graphics/whatever if that's what you enjoy. I've now been implementing what I've learned into a nice software renderer using directX on my windows 10 PC and guess what, the skills I've gained from mathematics and algorithms and game logic/design are perfectly relevant today. It doesn't matter if it's a "waste of time" and I could use the primitives in any of the modern APIs to do nearly everything, the point is that I LEARNED how it's done and I can implement exactly what I want with no waste, and I've gained better problem solving skills. Just don't get carried away with the need to understand everything at the lowest level, you'll find 10 lifetimes wouldn't be long enough.
General programming: I almost always throw together short functions into turbo C / MS C/C++ or even just QBasic when I have ideas stirring that I want to test out. If you're learning algorithms, there is absolute ZERO wrong with programming in dos and plenty to gain. You are simply writing console applications no different than modern students do using [insert Linux distribution]. Just don't get too heavy into learning the intricacies of a specific old compiler unless you're trying to do a big project for DOS machines. You just have the added bonus of having fun doing it because you're using a DOS machine. Just make sure you use your time wisely for yourself, and don't skip out on learning modern APIs and compilers just because they make things "easier" (to me they don't, the abstraction layers add confusion for many things).
As for low level stuff you're right. In DOS you have total access to your hardware i.e. VGA memory. You'll get better at moving things around memory in C, and then you'll find yourself learning 80x86 assembly so you can blast full WORD writes to the vga instead of the single bytes you'll get in C with nice little inline ASM functions. You'll be "Close to the metal". I don't care what advice they give elsewhere on the internet, you need C/C++ and assembly if you want to write the highest performance code even now. I happen to think as the progression in silicon is hitting a dead end, there will be a major shift back to performance code and the skills are very relevant in embedded systems today, so you're gaining tons of practical skills doing that.
**Not that anything is wrong with learning Python or other modern languages, I just get tired of hearing about how the "old way" is a waste.
Sup. I like computers. Are you a computer?