You are right that you need to check if there are valid targets for the ability of a card. But that is just checking, not selecting. This is what the rules say regarding "Initiating an ability":
STEP 1: "If the card or ability specifies one or more targets, CHECK that it has at least one valid target. If the card or ability does not have at least one valid target, it cannot be played or initiated."
(...)
STEP 5: "Pay the costs (...)"
(...)
STEP 7: "The card is played or the ability (if not canceled in the previous step) resolves (...)"
So you check, pay and then resolve. Resolving includes selecting the target. In the case of the Bishop card you were mentioning, you can play the card when there is an enemy attacking. In that case, you do not really even need to check that there resourced cards in your discard pile, because the condition for being able to play it (namely, "When an enemy attacks") is already met. You could play it even if there were no resource cards in your discard pile and you don't select the targets at the moment of checking if you can play the card. You then pay (and you could decide to overpay then to get some resource cards into your discard pile) and you then resolve it, selecting (if any) resource cards from your discard pile.
Let me give you another example. Imagine a hypothetical card like this: "Basic event, cost 1, skill. Action: Select an Ally card from your discard pile. Return that card to your deck and draw 1 card." In order to being able to play it, you need to have one Ally card in your discard pile. Otherwise, STEP 1 above fails. But then you have to pay it (STEP 5). If you pay it with an ally card, that card goes to the discard pile and you can select (STEP 7) THAT NEW ally in your discard pile to be the one that you return to your discard pile. You do not select the ally in STEP 1, you just check that it exists. In STEP 7, new valid targets may exist and you can select those too.
For a more real example, consider Tactical Brilliance (https://marvelcdb.com/card/33010). There are two targets for this card: a scheme and a tactic card in your discard pile. When you check the conditions of STEP 1, it is enough that there exists at least one of them. You can play this card even if there is no tactic card in your discard pile. Then, you can pay it (STEP 5) with a tactic card and select that tactic card to return it to your hand when you resolve the effects of the event (STEP 7).
Best!