Sabaton are also HUGE Judas Priest fans. They've been on record stating that they (Par & Joakim) formed the band one night while listening to Painkiller, deciding that they wanted to play music for a living. So the opportunity to open for your heroes is likely one too large to pass up. It also puts them in front of another new audience (having opened for Iced Earth, Nightwish, Accept, and Amon Amarth in the US).
If they were the band that bailed on Nightwish, I think they did it for a good reason. I'd be surprised if Nightwish wanted to tour with them again, having just done so 5 years ago, and seeing that Sabaton is headlining the same venues on their own in the US.