Some NPCs will give you an item if you fulfill certain requirements. For instance, once your partner has reached maximum affection, the Kid will give you a item that you can to exchange for a item that will allow you to get a legendary Pokemon. Another NPC in Sinnoh lets you get a Rotom Key, which allows you to get a different form for your Rotom, if you have a Rotom.