The Captain can put anyone he wants in charge of a certain department on his ship.
It still doesn't make sense.
NCO's are not trained and qualified for "command", he would be "commanding" a large engineering staff, most likely including people who were trained and qualified to command.
Just saying it how it was shown on screen.
Picard made Wesley a helmsmen and Janeway made Torres the Chief Engineer. Being a captain has its perks.