If you have multiple views on the same url they will be overwritten and ...

...only the last one will be returned by getAllSitesIds().

That's why restructuring the returned array to either have the id as a key or nesting id and url one layer deeper makes sense.