Something tells me this isn't over.
I'm not as familiar with this area as fighter capabilities, but from what I know the C-295 isn't the better aircraft... the C-27 won hands down the first iteration and nothing has really changed since then. The C-27J is significantly faster (key for reaching remote locations quickly). As someone joked to me "I guess the government is mandating people stay alive for an extra few hours while in distress. The C-27 also had much more power, which was seen as extremely useful while flying in mountainous terrain. Furthermore the C-295 does not have cockpit ceiling vision, another strike against it while flying in difficult terrain. Finally there is the Cabin size, which the -295 is a bit of a tight squeeze for a sartech.
Basically this decision was based on Cost and the new Value proposition format, which allowed IRBs to dictate what the Military gets. Yes the C-295 is better than the Buffallos, but its significantly less capable than the C-27. It just puts our personnel and the civilians we serve at greater risk.