Firstly there is nothing wrong with someone wanting to write a game engine as an educational tool and the topic-poster had a very specific question about game-engine development. “Write games, not engines” is not the universal solution. If it was then guess what: Games would never be made since no one spent the time to write the engines behind them. Not only that but I would be out of both a job and a hobby. Some people, myself included, appreciate the lower-level technology behind game development and enjoy learning about it more than we enjoy making the actual games. It is also true that some people dive too deep before they are ready, but this is not the way to inform them of that fact.
There is indeed nothing wrong with people wanting to throw code together under the gise of some sort of 'learning' experiance BUT I'm willing to bet that ANYONE doing that is going to end up with a mess which isn't fit for purpose WITHOUT a project driving it.
Of course games would be made without an 'engine' behind it - If you start from scratch you don't spent months putting together some grand unified design before working on the game, you attack the game, figure out what the game needs and then write the code for that bit refactoring and rearranging as scope changes. At the end you have a nice chunk of code, a shipped product AND code you can reuse as you know it is fit for purpose.
Yes, there are many people who like hacking on low level stuff, hell I'm one of them, but thinking you can sit in isolation throwing out code which is going to be useful is foolish, more so if you are a beginner/someone new to the process as you have NO IDEA what you want and need to do. To use the overused car example; it would be like someone sitting in a shed who has never designed a car trying to design and build a powerful engine block - sure they might be able to do it but when they come to try and fit it into a car they might be in for a shock...
If you take a step back you'll very quickly see that EVERY useful game engine which has appeared in the last 15 years has, at some point, started off as a game or been driven very firmly by game requirements; the Unreal engine was not developed in isolation and thats part of what makes it good.
And I don't throw this out there as a 'oh this could happen...' I've SEEN it happen in a company where a bunch of very clever people sat down to write an engine in isolation without a game to drive it (only a small test scene) and it didn't survive first contact with a game; large parts had to be rewritten (not refactored, chucked and redone), more had to be refactored, massive holes in the design came to light once someone tried to use it. Even things as fundimental as 'spawn an object in the world at runtime' was missing because it wasn't needed for the tiny world based test case. This wasn't some bunch of newbies, this was people who'd been in the industry sometime, had shipped games and still managed to screw up to the point where only one game will be shipped on this engine before it is going to be (effectively) thrown away and rebuild/salvaged using input from the games which will need to use it in the future.
(It also being done slower this time; before the 'renderer' interface was 'designed' in 2 days... this time out we are about a month in and still not settled on a design, although we are converging on something which everyone seems happy with.)
So if professionals can screw up then I give someone who is new at it no chance of producting something workable without a game as their primary focus.
Sure, if they want to spend months/years on something which they have to massively refactor at the end of the process when they realise 'shit, this doesn't work...' then fine, I don't really care, although I reserve the right to point and laugh at them when they realise this.
Thus, if you want to write something which can be used to power future games then write a game - you'll learn just as much if not more while producing WORKING and USEFUL code at the end of it. Even if you don't 'ship' the game at the end, or get 6 months in and decide to switch game project the point remains; with something guiding you'll still have usable code to run with.
Of course, if you don't want to power a game with your code then do whatever; it doesn't really matter, if you want to just get pretty images on the screen then you can just throw things togeter adhoc... *shrugs*