What's random is enforcing a set ratio if city state types. How does that affect gameplay? If one type if city state needs to be more prevalent than others on the map then the script should account for that. The pool of city states doesn't need to reflect an intended ratio.
The fact that there IS a ratio makes it fairly clear that the map script DOES NOT account for that.