In this challenge episode you will put your existing knowledge about URLSession to the test in order to download and display data downloaded from the network.
Regarding your question, about wrapping session.data(from: url) in a task I imagine you are referring to the solved challenge.
In this scenario, using Task within the function may not be strictly necessary as the calling context already calls it in a task. If you were to call this method elsewhere, however, it could be beneficial to do so in a task within the function, but there’s no one-size-fits-all solution.
As for how we call the function within the button’s action, if I recall correctly Task is used there in order to avoid a compiler error about calling an async function in a non-concurrent fashion.