Last year, the D-backs lost 93 games, costing manager Chip Hale and most of the front office their jobs. Obviously, a lot of things have to go wrong for a season to turn out like that, but you can start with the rotation, which posted a 5.19 ERA that wasn't

Last year, the D-backs lost 93 games, costing manager Chip Hale and most of the front office their jobs. Obviously, a lot of things have to go wrong for a season to turn out like that, but you can start with the rotation, which posted a 5.19 ERA that wasn't only the second highest in baseball, it was the highest in Arizona history -- even higher than the 2004 club that lost 111 games.

With new leadership came new players and new philosophies, and so some rebound was expected. Except, what wasn't expected was this: Entering Thursday's game in Chicago, the D-backs' rotation was sporting a 3.55 ERA, second only to the streaking Dodgers. A year after being second worst, they're second best. How in the world does a turnaround like that happen?

It doesn't, usually. Let's dig into four big reasons why Arizona's rotation has become one of baseball's best -- some that were easy to see coming, and some that weren't.

A better support system

We know that the 2016 D-backs didn't do a great job of putting their pitchers in position to succeed, because we wrote about it here in February. Last year's catchers posted a negative 16 runs in pitch framing, per Baseball Prospectus, tied for the fourth-worst mark in the game. Last year's outfielders were negative 34 runs in outfield range, according to UZR, the second worst in the game. It's difficult to produce under such conditions.

By cutting ties with Welington Castillo and Tuffy Gosewisch while importing Jeff Mathis and Chris Iannetta, Arizona made its interest in improving framing clear. The value of a single pitch can be huge; for example, the Majors have an .860 OPS after the count is 1-0, but just .626 after the count is 0-1. It's worked; after last year's -16, this year's group is at +8 runs, seventh best. Last year, only 4.6 percent of pitches Zack Greinke threw outside the zone became called strikes; this year, that's 7.8 percent.

The outfield has improved, too, jumping from that -34 to +4, tied for ninth. As with the catchers, that's largely thanks to a change in personnel. The four D-backs who logged the most outfield time in 2016 were Yasmany Tomas , Brandon Drury , Michael Bourn and Chris Owings; this year, that's David Peralta , A.J. Pollock, Gregor Blanco and Tomas. Instead of two infielders and a slowing Bourn, the D-backs' outfield is staffed with actual outfielders.

The expected breakout arrives, with help

On the surface, Robbie Ray had a lousy 2016, going 8-15 with a 4.90 ERA. But it wasn't terribly difficult to look under the hood and find signs of a far better pitcher; he did, after all, appear on our list of likely breakout pitchers in January. Ray's 28.1 strikeout percentage was fifth best among qualified starters, and that 4.90 ERA was paired with a 3.76 FIP -- the largest gap of any qualified starter -- and a .352 BABIP, also the highest of any starter.

Ray has pitched largely the same this year. His strikeout rate is up slightly to 30.1 percent, though his walk rate is up slightly, too. He's allowed approximately the same number of homers. Looking at his Expected Weighted On-Base Average -- an advanced Statcast™ metric that excludes the impact of defense and ballpark, focusing only on the usual outcomes of exit velocity and launch angle, plus real-world strikeouts and walks -- Ray's number has dropped only from .318 to .308.

But in terms of Ray's actual wOBA, that number has dropped from .337 (similar to Matt Garza and R.A. Dickey last year) to .296 (more like Yu Darvish and Carlos Martinez ). Sure, he's changed his approach, throwing far more curveballs, but underneath, he's the same guy. Chalk this one up to the benefits of better catchers and fielders. (Ray is currently on the disabled list after being hit with a line drive, though he's expected to be fine.)

2017's new addition over 2016's new addition

Last year, the big new trade addition entering the season was Shelby Miller , acquired from the Braves for Ender Inciarte , Dansby Swanson and Aaron Blair . It didn't go well; Miller battled mechanical issues all year, posted a 6.15 ERA in 20 starts, and lasted just four starts this year before requiring Tommy John surgery.

This year, the new face in the rotation is Taijuan Walker , acquired from Seattle in a deal for Jean Segura and Mitch Haniger last November, and it's been a far more fruitful acquisition. In 17 starts, Walker has a 3.55 ERA, and looking at the same xwOBA metric that measures quality of and amount of contact, he's been one of baseball's 40 best starters this year, in the same range as Chris Archer and Jacob Arrieta . Segura and Haniger were a high cost, yet Walker has returned value.

The important swap in roles (Bradley, Godley)

In 2016, Arizona had two prospects struggling to make it work. Archie Bradley , the No. 7 overall pick in 2011, made 26 starts with a 5.03 ERA. Rookie Zack Godley , acquired in the 2014 deal that sent catcher Miguel Montero to the Cubs, put up an unsightly 6.39 mark in 27 games, mostly out of the bullpen.

This year, everything is different. With Walker in town and Miller initially healthy, Bradley broke camp as a reliever. No longer needing to turn a lineup over multiple times, his velocity has jumped from 93 mph to 96.2; his strikeout percentage has jumped from 22 to 29 percent; he's cut his walk rate from 11 percent to 5 percent. With a 1.47 ERA, Bradley has been one of baseball's most dominating relievers this year. It's difficult to see him ever returning to the rotation.

Merely turning Bradley from an underperforming starter to a strong reliever would have helped, but Godley did it in reverse. Joining the rotation full-time in May after Miller was injured and Braden Shipley (5.27 ERA in 11 starts in 2016) faltered, Godley has been a revelation. Focusing mostly on his sinker and curve, Godley has (among starters who have thrown as many innings as he has) a top-10 grounder rate to pair with a top-20 strikeout rate.

We've been referring to the xwOBA stat, which again measures quality of contact as well as amount of contact, plus strikeouts and walks. So far, 155 starters have faced 200 hitters, and the top 10 includes superstars, like Max Scherzer (.234) and Clayton Kershaw (.251). It includes Greinke (sixth, .258). Would you believe it also includes Godley, who ranks eighth?

Top Expected Weighted On-Base Average by starters in 2017

.234 -- Scherzer

.242 -- Chris Sale

.248 -- James Paxton

.251 -- Kershaw

.257 -- Corey Kluber

.258 -- Greinke

.261 -- Alex Wood

.265 -- Godley

.266 -- Dallas Keuchel

.271 -- Aaron Nola

It's not all roses, of course. Longtime D-back Patrick Corbin struggled last year (5.15 ERA) and hasn't been great this year either (4.77), lasting only three innings in Tuesday's 16-4 loss to the Cubs. Everything can't always work out. But after last year's disaster, they're currently on track to host the National League Wild Card Game. You can thank the rotation -- and the players who support them.