It's especially convenient for restoring primary or standby database through catalog with the same DBID, no matter what the backup sets were coming from which database.
That is to say, you can always perform a full backup on standby database instead of the primary. The recovery catalog knows how to use the backup from the standby to restore the primary.
In another case, you might want to duplicate a database through catalog, then you have to fake the source database to get the backup records from the recovery catalog.
Question 1: How could one database fake the other to make catalog know which database that you want to restore?
It's SET DBID clause. For example:
[oracle@test ~]$ rman target / catalog owner/password@catdb
3> set dbid 3402520347;
4> set until scn 26593982035;
5> restore database;
6> recover database;
7> alter database open resetlogs;
Question 2: How do I know the DBID of the source database?
On the source database, you can query a dynamic view to know it.
SQL> select dbid, open_mode from v$database;
You can also login RMAN to know current DBID.
[oracle@test ~]$ rman target /
connected to target database: ORCL (DBID=3402520347)