This also might be a situation where Ottawa wants something to show for that trade so they double down and make two terrible decisions instead of one.
Duchene is still a good deal, and if we look at this in a vacuum - they literally have no choice because like you said letting him walk on top of giving up that 1st round pick would be insanity.
my thoughts are this:
#1. by signing Duchene they are making a statement that they are not throwing in the towel, meaning that pick going to Colorado 100% CANNOT be a lotto pick. That statement also needs to resonate with Mark Stone and Ryan Dzingel who both are I am sure receiving a lot of attention. If they get Duchene to resign there, then maybe they feel Stone and Dzingel will stay as well. Stone seems to like it there as Ottawa gave him his shot to be a stud.
#2. whatever the AAV is, is going to be weighed differently to them than it would us. by that I mean $8-9 mil for Duchene is what will be needed the next few seasons to reach the damn cap floor. their entire first line are UFA's hahahaha...that is nuts. they are going to need to sign some players to some $$$ contracts to reach the floor, and by handing out money to Duchene a guy they know and like, it makes sense. you don't want to be handing out contracts this way, but this is not the first time we have seen this and it won't be the last. Bobby Ryan is on a bad deal, they are stuck with, but Gaborik is done on LTIR and outside of him nobody else is signed for much over $4mi (Duchene, Stone, Ryan, and Ceci....Anderson will be let go after the year as well or sign for cheap to stay)...
#3. this team has a ton of youth coming. we already are seeing it with Tkachuk, Batherson, Colin White, Chabot, Lajoie, Logan Brown, Wolanin, etc etc.. I honestly think they are going to be a very strong team in 2-3 years, a legit contender - you need some veterans to help lead that movement and Duchene is that likely guy at this point. I say this assuming Mark Stone signs, but if he doesn't they can't let him walk for nothing. They can only start renegotiating with him January of this year, so again I think if they can get Duchene to stay (he is the first domino for them) and offer Stone $9mil plus he stays too...that makes sense for Ott to do this. it might look ugly, but they have no other options but to do this IMO.