The main motivation here, from a cognitive perspective, is that you’re trying to stimulate the encoding benefits of retrieval practice (i.e. relative to merely restudying). If a prompt “gives the answer away,” it amounts to restudying; the goal is to induce retrieval.