I don't understand why the Faceless Men wanted the Waif to keep attacking Ayra and then to try and murder her.
It's important to note that the waif is an acolyte, not a Faceless Man.
The Waif was an acolyte of the Faceless Men serving in the House of Black and White in Braavos.
While she initially comes across as someone who has mastered the art of being no one, she seems to slip up when Arya is concerned. She carries emotions for Arya's unworthiness (in her eyes), and she has made it a personal vendetta to prove that Arya is not a Faceless Man.
Compared to Jaqen, the waif has always been disapproving and harsh for Arya; whereas Jaqen took the role of a "kind" teacher. But be aware that this can be an intentional training device, essentially "good cop bad cop", as part of Arya's training. her being harsh for Arya does not prove that she hates Arya.
However, where this does cross the line into no longer being a training regimen, is the conversation between the waif an Jaqen after Arya refuses to assassinate Lady Crane.
WAIF: As I expected.
JAQEN: A shame. A girl had many gifts.
JAQEN begins lifting the face off of the corpse.
WAIF: You promised me.
JAQEN: Don’t let her suffer.
The WAIF nods and exits.
A promise (and therefore a deal) was made, which means the waif explicitly asked to be the one to kill Arya, and Jaqen/the Faceless Men agreed to it.
That sounds very much like a personal vendetta, which implies that the waif has an agenda other than being "no one", which means the waif is actually failing at being a Faceless Man.
The fact that she had to make a deal with the Faceless Men proves that she is not part of the "hive mind", but rather makes a deal from one entity to another, which proves she is not "no one" and instead has an opinion that differs from the apathy that the Faceless Men expect out of their members.
It is therefore possible that the waif was allowed to murder Arya because whoever died, an unworthy Faceless acolyte would die. The outcome, as far as the Faceless Men is concerned, would be the same.
It's not impossible that Jaqen knew/expected that Arya would win, and that he knowingly sent the waif to her demise. But we don't know either way. What does seem evident though, is that Jaqen was well aware of the waif's mistakes (personal grudges) because he's able to identify the same mistakes in Arya.
Answers to your questions
I don't understand why the Faceless Men wanted the Waif to keep attacking Arya
At best, it can simply be a continuation of the training regimen. At worst, this is part of her personal vendetta against Arya.
and then to try and murder her.
The Faceless Men are a death cult. Although I don't think it's explicitly stated in the show, it's not that surprising if failing the "entry exam" results in death. Or, at the very least, that the Faceless Men are apathetic towards an unworthy recruit dying.
This, combined with the fact that the waif explicitly asked to murder Arya when she conclusively failed, suggests that the (attempted) murder of Arya could have been condoned or at least not prevented by the Faceless Men.
This is a little bit of a repeat fro my answer from, Is Arya Stark the only girl to become No One?, but I was trying to prove how the Waif is also "no one"...
"Every Hurt is a Lesson, Every Lesson Makes You Stronger." -Syrio Forel
The definition of what a waif is, is "a homeless, neglected, or abandoned person, especially a child."
This is what Arya is and so by fighting the Waif, she is basically fighting the worst possible version of herself in order to "kill" herself and become "no one".
"A man is not Jaqen H'gar."
In the books we get a better sense that Faceless Men operate in "roles" in which Arya refers to them as they appear and/or behave: The Kindly Man, The Fat Fellow, The Starved Man, etc.
They also play "The Game of Faces", which includes being able to determine when someone is lying, but also then teaches them to become better liars, as Faceless Men need to take on fictitious or semi-fictitious backstories. In season 5, episode 6 Arya wants to play again . The Waif then tells Arya her story, but suddenly questions Arya if Arya thinks that was a truth or lie to once again get the point across that it may not be true or entirely true.
Then later Jaqen comes to play the game with Arya and at the end of the scene Arya says, "I'm not playing this stupid game anymore!" and Jaqen says, "We NEVER stop Playing".
One may notice during the scene in which Arya becomes blind that she at first thinks she is going to be poisoned, as the Waif holds her back and the Kindly Man (with Jaqen's face) seems to move towards her with the bowl of poison, but just then he swallows it, collapses on the floor, and appears to have died. Arya runs to him crying out, "No! You can't die!".
Then she hears his voice from behind her. She turns around and now sees the face of Jaqen instead of the Waif! She looks back at the body lying on ground, dumbfounded. She begins to peel off several layers of faces until she reaches her own, sees herself appearing dead, and then she becomes blind!
Valar Dohaeris! (All Men Must Serve)
It's in that moment that I believe Arya died or gave up her [some part of her] soul to serve The Red God (The God of Death). IMO this is similar to what happens when one becomes a wight for the Lord of Light.
If Arya is also a servant, who in some way died to serve The Red God,it may also explain why that when the Waif comes and stabs Arya several times in the front (a juxtaposition calling back to when Arya stabs the Frey soldier in the back) that she doesn't just die, as easily as she should!
In addition the whole Lady Crane plot seems awfully suspicious, because she clearly embodies both Cersei Lannister and Catelyn Stark at the same time, while also reminding us of Arya's feeling of jealously, as she chooses to call out the actress that plays "Sansa", believing she was the one who hired the Faceless Men to kill Lady Crane in the first place. Not to mention the sheer irony that The Faceless Men themselves are like 'magical actors' pretending to be someone else they are not and then sending Arya pretending to be someone else, to kill someone pretending to be someone she isn't!
What is Dead May Never Die (But Rises Stronger, Harder) - Greyjoy second motto
But Arya never fully understood the lesson that she was given upon becoming blind, because even though she thinks she has killed the Waif, the reality is that she may not of, simply because as the earlier Jaquen/Waif scene already depicted, you can't kill "no one". The Waif was just a face that can be used to play a role like any other. The Waif, in this case, was just used as a way to fully [metaphysically] transforms Arya into becoming "no one".