The Ravens had the most injuries in the NFL by a wide margin. In one year they lost their 1st, 2nd, and 3rd string running back (I think that happened in a week). They lost their 1st, 2nd, 3rd, 5th, 7th and 8th CB to the point that they were starting practice squad players. They lost both starting safeties for long stretches of the year. They lost a starting DL, a starting LB, their starting LT, their starting RT, their backup T, missed their starting WR for the first 6 weeks and for the last 5 weeks were out their starting QB and I am almost positive I am missing some players.
As for why their roster is good. Just from last year they have the second best TE in football, an all pro LT, an MVP QB, a PB guard, some 1st round WRs who I do not know much about but seemingly played well. On defense they have 2 all pro corners and they just signed Williams who was carrying the Saints defense but they did not have the money to sign which probably means they have the best secondary in football.
There is a reason people talk about the Ravens as having a loaded roster. As for the lack of extension, apparently Lamar wants to bet on himself rather than sign one (which considering the QB deals of the past couple weeks I can see why) and you cannot force a player to sign. That leaves you with the Bengals who were a great offense minus the OLine and they are buying an OLine with some very good players (I would not be surprised if they also made a move on Armstead just to make it an elite OLine). I comfortably have the Browns with Watson has the 8th or 9th best team in the AFC (though they would easily make playoffs in NFC).