It feels similar to Android intent system. If I want to scan a barcode, an app sends a message to the system asking if anyone can do it. The app doesn't have to build that functionality, nor does it have to be provided by Android itself.
Same with sharing other types of data, installing new apps will automatically appear if they provide the functionality that another app asks for.
Same with sharing other types of data, installing new apps will automatically appear if they provide the functionality that another app asks for.