My understanding, from reading and watching the Marathon is that Mon Mothma likely decommissioned the majority of the remaining military forces under the Alliance when the New Republic was formed.
If you recall, the whole reason that Sifo-Dyas (a former Jedi Council member) made the request for the clone army in AoTC is because the Republic didn't really have a standing military at the time. He figured something big was coming and wanted an army but got kicked off the Council for making such a stink about it. The Sith found out and then killed him and used the army to set up Order 66 and the coup against the Republic.
So, in that light, it makes sense that large number of those old Rebellion fighters ended up transitioning to the Resistance with a tacit understanding that the New Republic was providing financial support.
As far as TFO is concerned, my belief is that the vast majority of the Imperial senior command got blown up in the 2nd Death Star when the Emperor was present on the station. That and the subsequent battles with the Rebellion/Resistance likely means that the new kids are the best and brightest of the new lot of officers.
What's interesting is that I find the First Order is a little more frightening than the old Imperial bureaucracy. The new guys are absolutely fanatical. The old Empire wasn't against blowing up planets or being total *******s but there was always a direction present to bring "order" to the galaxy. I get the feeling that there's a lot more brain washing involved with the First Order whereas the Imperial officers in the original trilogy always seemed to hold an undercurrent of fear/loathing toward Vader and the Emperor. The First Order just seems entirely fanatical, almost in a religious cult sense with Snoke. I think the repeated anger at Finn's treachery, when he's really just a foot-level grunt, speaks to that. The fact that they blew up 5 planets to send a message in anger really highlights their nutso status,