This is the third thread about this issue that I encountered. There was
one from 2014 and my
one from 2015... Will there be a fourth one in 2017?
I believe the answer is is that the AI editor is bugged like that when it comes to custom races. Some workarounds to this are:
1) Base your custom races' town halls on existing town halls (as in rename and replace them without creating custom units) and replace one of the 4 races with a custom race. Of course if you also want to use all the 4 initial races this becomes an issue.
2) Have your techtree not use a 3 tier system for town halls. I know in Dawn of War some races have a 3 tier town hall system, others don't and instead use buildings/researches to advances in tech.
3) Design your techtree to make having more town halls useful in some way. Maybe make it a strong defensive structure? Production of elite units? Maybe the more halls you have the cheaper some units become?
Hope you can get around this annoying problem >.< For myself I changed my custom races' town hall to be a single-tiered one to get around the issue.