Angsty ships between gray villains who struggle their way through redemption arcs and heroines who perhaps have some moral ambiguity in them as well are really sweet and god tier. Look at the popularity of Reylo over at the Star Wars fandom, or Draco x Hermione in HP, for example.
There's just something very intriguing and grand about tortured villain-ish characters reforming and redeeming themselves and reshaping the directions of their lives. There's something deeply hopeful about this idea that you can change your life and atone for the mistakes you've made, even if they were horrifying. Atonement, redemption, mercy, hope, second chances. Plus you get a lot of sweet forbidden passions angst during the way.
Also he didn't really try to kill Anna as much as he left her to die from Elsa's curse, and he risked his life trying to keep the kingdom safe and went after Elsa's head under the impression that she'd intentionally murdered Anna through freezing her heart, so while he is indisputably an asshole villain douchebag, imo the movie's writing was ambiguous enough to leave room for a believable redemption arc. He's a villain, sure, but not a 100% evil irredeemable one like Jafar or Ursula.
It's a ship built on potential. It wouldn't work under current status quo, but it's got the makings for a great romance. It just needs to be written well enough and Hans would obviously need to go through sufficient trials and suffering to make a change believable, otherwise it'll feel shit and hacky.
I really like Hans as a char and the conflicted moral ambiguity I kinda see in him, so I'm hoping that he'd get a proper development arc - even if he doesn't end up with Elsa.I read one nice fanfic (that sadly hasn't been updated in over a year, I hope it comes back) that really sold the pairing to me, though I'm a sucker for that kind of morally ambiguous hero-villain romances anyway.