First off, I support this idea. A player should be able to choose which path he'd like to take. He can either do military or goods production or both which most players do anyway. But if a player wishes not to participate in the military part of the game they shouldn't be forced. The barracks takes up quite a bit of space which 1 - 3 goods buildings could fit in there. If a player would like to participate in military activity at a later stage, he can rebuild his barracks as kerykeion highlighted.
Possible reasons why demolishing the barracks was never included in the game could be because of how many features it will actually affect. This doesn't just affect population and culture which will go into the negative like other buildings, but also provinces, available troops and armories.
Provinces: There are two options directly relating to the barracks when taking over a province, that being fight and auto fight. These should be greyed out and made unavailable to the player if he does not have a barracks albeit him having available troops to fight which he may have trained prior to demolishing the building.
Available Troops: A player has an inventory when he trains troops which could be made unavailable if there is no barracks in the city. A player selecting the fight option can still see his available troops but everything greyed out so nothing can be done in this menu. Makes it a bit redundant but a player might find it 'nice to know' what troops he does have still. Alternately, removing the barracks deletes all available troops - simple and less work.
Armories: The only reason why a player needs them is for increasing the training size. If a player wishes to remove the barracks, he should be instructed to remove all armories before the sell button can be selected when selling the barracks.
So yes, it's not just the case where a button can be turned on and off to make this idea happen. There are some issues that will arise if a player could sell it without adding some dev time to fix other features it will affect.
I do hope this will be done though.