Racing tyres are smooth for a reason
What tread is actually for, and why removing it adds grip on dry ground.
Racing tyres are smooth because tread grooves exist to clear water from underneath a tyre, and on a dry surface that job is not needed, so every groove cut into the rubber is simply rubber that is no longer touching the road and no longer able to contribute to grip.
Grooves are drains
A road tyre's grooves are channels for water to escape through as the tyre rolls. A thin film of water trapped between rubber and road stops the rubber touching the surface underneath, and grip falls away sharply once that happens. The grooves give the water somewhere to go, squeezed out sideways and backwards through the pattern as the contact patch rolls forward, so the rubber behind the leading edge can still reach the road. The faster the tyre rolls, the less time each part of the tread has to clear the water arriving under it, which is why aquaplaning becomes a real risk at speed on a tyre whose grooves cope perfectly well at walking pace.
On a dry surface there is no water to clear, so the reason for cutting grooves disappears. What remains is a tyre whose grip is set by how much rubber is pressed against the road, and a slick puts its whole footprint down because none of it has been cut away for channels it does not need. A grooved pattern also leaves the tread standing as separate blocks, individually smaller and floppier under load than a continuous slick surface, so a wet-pattern tyre used on a dry track tends to run warmer and wear less predictably.
Trainers and boots on a gym floor
The same trade-off is easy to feel in ordinary shoes. A flat-soled trainer or a dance shoe feels stickier on a dry, smooth gym floor than a boot with a deep, chunky tread, because far more of the flat sole is in contact with the floor, while the boot is standing on the tips of its own tread pattern with gaps between them contributing nothing. That same boot becomes the better choice the instant the floor is wet or muddy, since its grooves are now clearing water and mud from under the tread blocks so they can still bite. Which sole grips more depends entirely on whether there is a liquid layer that needs somewhere to go, and a runner choosing spikes for a wet cross-country course over the flat shoes worn on a dry track is making the same trade a tyre engineer makes at the start of every event.
Slicks, wets, and watching the sky
The difference is large enough to be the whole reason racing series run separate tyres for wet and dry conditions instead of one compromise tyre for everything. Fit a slick to a wet track and it loses grip dramatically once a film of water builds up beneath it, because the water has nowhere to escape and the tyre starts to ride up on a layer of liquid, a partial aquaplaning that can strip away nearly all of its grip within seconds once standing water appears.
Choosing tyres is therefore one of the first setup decisions a team makes for an event, and it is often left as late as the regulations allow, since conditions can shift in the hours before a car leaves the garage. Committing to slicks on a day that turns wet can cost more grip than almost any other single setup mistake, however good the rest of the car is. Running grooved wets on a dry track gives away the grip a slick sitting in the garage could have provided for free, since every groove not clearing water only costs contact area. That is why teams watch the sky as closely as the stopwatch whenever the weather looks unsettled.