Stokes was found not guilty of any criminal wrongdoing at a trial in Bristol on Tuesday, almost 11 months after being arrested following a brawl in the Clifton area of the south-west city. The selectors and management team made a decision to return the all-rounder straight back to the squad despite questions about whether he would be mentally ready to play after his court appearance, which took place during the second Test.
Stokes replaces left-arm swing bowler Sam Curran, England's man-of-the-match in their 31-run win in the first Test at Edgbaston earlier this month.
"It was a collective decision - myself, management, captain, the board, Ed Smith - everyone had a say", Bayliss said.
'Ben is desperate to get back playing cricket. "If I was in England's position, I would have wanted him to play", the former India all-rounder added. He's desperate to get out there, put in performances and concentrate on his cricket now. "He feels ready to play".
The third Test of the five-match series starts at Trent Bridge tomorrow.
England first named an unchanged squad for the Trent Bridge Test, but kept the door ajar for Stokes pending court proceedings.
"But he's offered so much to this bowling group - and at the start of the series I said to the team for us to win a five-match series against the best side in the world, it's going to take more than just 11 players". If we go the full five days at Trent Bridge there will be an eight-day gap before the fourth Test in Southampton.
"I think the hard part is the fact that everyone is performing so well", Root added.
"There were a couple of small indiscretions in Australia after that incident and I think the players have finally woken up, " he said.
"On this occasion he's unfortunate to miss out", Root added, "but what he's done so far has been nothing short of high class".
The Spin: sign up and get our weekly cricket email.
The 27-year-old Stokes missed the second Test at Lord's as he was attending his trial for his involvement in a fracas in Bristol in September.