By the time Diocletian was considering Milan for the capital of the WRE, imperial defence was no longer a question of simply stopping the invaders at the border limites. Politically, placing strong units at the borders was an invitation to rebellion; militarily, the Germanic confederations during the Crisis of the 3rd Century had not only shown themselves capable of breaching the (massively weakened) limites, but had also shown themselves capable of conducting deep raids into the Roman interior, as the Alemanni showed in 258-60 when they broke through the Upper Germanic limes, crossed the Alps and raided all the way to Rome itself.
As such, Emperors from Gallienus onwards saw it necessary to deploy a mobile reserve of cavalry units in the rear (comitatus) that could rapidly move to reinforce pressure points, plug holes in the limites or at worst, intercept invaders who had done their damage and were returning home. This sort of rapid-response force was too dangerous to be placed under anybody else's command but the Emperor's, so the Emperor had to be where his comitatus was.
Milan was well-placed to be the HQ of a comitatus. It was at the junction of key routes to the Rhine, the Danube, and if necessary, the Balkans, which not only meant easier reinforcement to those places but also meant that invasions into Italy were essentially "funneled" through Milan, unlike, say, a base on the other side of the Alps which could be bypassed through the use of a different pass/route. Milan was also sited in the fertile Po Valley, which made it much easier to maintain an expensive cavalry force given the Empire's diminished economy (which made distant overland supply impractical).
Lastly, moving the capital from Rome also let the Emperor exercise his powers (comparatively) free of Senatorial supervision or intrigue, which suited the tastes of the more autocratic Emperors such as Diocletian.