When there are two identical entries in a .po file, how does the translation mechanism determine which one to use?

WordPress’ translation mechanism looks not only for the string of the translation functions like __( 'string', 'key' ). It looks also for the key, in your case the 'buddyboss-theme' and search only in a translation file with this key buddyboss-theme-en_US.po.

Reference https://make.wordpress.org/polyglots/handbook/plugin-theme-authors-guide/