As Janus Bahs Jacquet states in the comments, the difference is essentially one of formality. The Cambridge Grammar of English states the following general principle:
In a wide range of informal styles, that is used instead of who/whom or
which in defining relative clauses. (p571)
This principle is confirmed by Swan in Practical English Usage:
We often use that instead of who or which, especially in an informal
style. (p478)
Swan goes on to note:
That is especially common after quantifiers like all, every(thing), something, any(thing), nothing, little, few, much, only, and after
superlatives. (p478)
When the relative reference is to a person, Swan states:
That is often used in identifying relative clauses instead of
who/whom/which. That is most common as an object or as a subject
instead of which. That can be used as a subject instead of who, but
this is quite informal. (p482)
The Cambridge Grammar of English notes (of defining/identifying relative clauses):
That may refer to the complement of a preposition, but not when the
preposition is placed immediately before the relative pronoun:
- The other girl that I told you about also lives in Bristol.
So, the following is not grammatical:
The other girl about that I told you also lives in Bristol.
It must be: ... about whom ... . Of course, this very formal usage conforms to the general principle noted above.
I suspect that the quiz was just marked incorrectly: "This orchestra, what these musicians are from, is very good" is certainly not possible in standard English. The use of "what" as a relative pronoun in relative clauses that come directly after an antecedent nominal phrase, e.g. in sentences like "You're that smart banker what killed his wife", certainly exists, but is dialectal and considered non-standard, as mentioned in WS2's answer here.
I think the Purdue Writing Lab's statement that "in certain situations, 'what,' 'when,' and 'where' can function as relative pronouns" refers to "fused relative" constructions. You can find some information on those in the answers to the following questions: Usage of "what", Wh- clauses vs Relative clauses, Ambiguity of "I don't know what you know.", "What might have appalled us when we'd started our trip just a few days ago no longer impressed us much".
Best Answer
The book has it right, except for one further condition: you cannot remove the relative pronoun when it functions as the subject of the relative clause.
So: