Nominatim tries to assign each place in its database a base “importance” score number to answer the question “If 30 places have the name ‘Berlin’, which one is the most likely a user meant?” For Berlin that’s the one in Germany. We humans say “of course” but that’s not how computers work.