Student or Learner
Essentially, we have a limited “supply” of willpower to use in our day-to-day – from choosing broccoli over cookies to being nice to our in-laws. Any of these tasks can contribute to willpower depletion.
This was verified in one of the author’s own studies, in which participants were placed in a room that smelled of delicious cookies and then divided into groups: one group got to eat cookies, while the other was asked to eat radishes instead.
How would you understand meaning of the bold-faced clause?
Does "got" mean "had the opportunity to do something"?
get to do something
informal to have the opportunity to do something:
We got to meet all the stars after the show.
She gets to travel all over the place with her job.
Link: get-Longman Dictionary
"Get to" and "have the opportunity to" are synonyms in this context.