It isn't some kind of gamebreaking problem, but it is a completely pointless middle finger to the player. It serves no purpose. There isn't some underlying design rationale behind arbitrarily deleting some of the player's units at certain points throughout the game. It goes against one of the oldest, most fundamental principles of the series: what you've built is yours, and unless you lose it through the choices you made in the game (such as an unsuccessful war, or stationing your army under an active volcano), the game doesn't take your stuff away from you. Except in Civ7, the game does repeatedly just remove things that you spent time and resources making, and shaped your plans around.
If the idea was to prevent players from stockpiling a bunch of ancient units and then upgrading them in the next age, that could have been accomplished much more reasonably by saying that units can only be upgraded to the highest tier that exists in the era that they came from. This would limit the extent to which you can slingshot into a huge, up-to-date army at the start of an era, without just erasing your investment. You're given a handful of current-era units regardless, so you still have the foundation of an army.
If the idea was to represent realism and not have slingers loitering around in the industrial age, what's the point of that? Firaxis abandoned the symbolic realism of the series in Civ7 with such nonsensical eyesores as Benjamin Franklin of the Mongol Empire. If they're willing to let something that goofy be a defining feature of this game, there's no justification for favoring realism over enjoyable gameplay in other aspects of the game. It most certainly shouldn't be a priority in cases such as this, where the cost of it is a nuisance for players.
At the end of the day, losing most of your units during age transition is not some huge problem that ruins the game, but it does represent a trend that is far too frequent in Civ7: meaningless nuisances that annoy or punish the player without being grounded in some sensible gameplay purpose that justifies it. Far too often, features in this game lack a window into the design principles behind them, and that seems to be because there were no design principles behind them. Firaxis just messed with stuff for the sake of making things different, and they didn't seem to put a lot of thought into whether or not it would actually be good for the game. Most of the time, it isn't.