Generally it's more advantageous for your own anatomy not to kill you without intervention, but they reproduce and that checks off the "good enough" box.
So yeah I’m sure evolution didn’t create something perfect in the disease here but it survives long enough, and kills few-enough people slowly enough in the wild to survive
Consider that measles in itself comes originally from a animal but a mutation found itself be able to spread to humans. That, in and of itself, is the process of evolution.
So while it is not necessarily a useful lens to try to interpret a moment in time as many unknown factors are at play (for example the same gene that is important for mortality might also impact survival in certain environments, and therefore how contagious it could be), if we were to understand it’s history of every mutation that came and went, the environments it lived in, evolution theory would explain why the path looked like it did. And subsequently why it is like it is today.
1. We might not be the only hosts or place where it can survive. Measles seems to have mutated from a cattle virus.
2. Killing the host might be the virus' end-game, in which case it evolved to extinction. Mutations nor evolution don't have a goal. There's not always an advantage. I bet most changes aren't advantageous.
3. If you really want to see everything in terms of evolutionary change, the virus could even been seen as a tool in human evolution.
Evolution is a way to look at changes in and forces operating on living things. It is a property that emerges for human observers. Nature doesn't care about it.
Short term intense disease courses tend to only work for a short period of evolution for new infection mechanisms, the intensity makes them sensitive to any increased immunity which ends up halting the spread for more mild versions. Infectious diseases tend to lower in intensity over the long term.