Not exactly.
If you wear your hair in certain styles in certain cultures it means different things.
A certain hair style may mean for example that you are a single female and looking for a husband. A married female or a male wearing that style is a sign that they have loose morals.
Well, sometimes people - especially young ones - just wear their hair or their clothes in the style common in fashion at the time.
I did it, everyone I know did it, when we were young. You probably did it too.
I don’t know much about Zanzibar, but what is the Zanzibar Govt. going to do if Black people from Europe, the US, and other places want to visit Zanzibar and spend money there? Kick them out or lock them up?
They should police clearly exhibited behavior, not hair. This isn’t much different to me from Muslim rulers demanding that women cover their heads or faces, assuming that they are demonstrating some kind of looseness/lack of morals, etc.