FF, all aircon units have the benefit of dehumidifying. When ambient air passes over the cold coil, the moisture in the ambient air will condense on it and provide the dehumidifying effect.
Single unit portable aircon machines, those with their compressor units in the main unit, with hot air ducted out via a single dryer-vent type flexiduct, tend to be rather inefficient. The waste heat duct is a bottleneck, along with the unit using already cooled, indoor air to cool the compressor side coil. I have seen a few single unit portables that have two ducts (intended to go to a nearby window) which are somewhat more efficient as they take air from outdoors to cool the compressor coil, rather than using conditioned air to do that job.
There's some portable split systems that work pretty well, as the compressor unit goes outside the treated airspace, normally outdoors, with the heat carried outdoors in flexible refrigerant lines. These units are not cheap!
In the specific case of the OP's query, where a grow op inside a garage has a typical window aircon unit through the wall, employing the remaining airmass in the garage to sink the heat from the compressor coil, this can work, given a few conditions. There has to be enough thermal leakage from the garage airmass to get rid of the heat removed from the op. If the garage airmass can't lose its heat, i.e. garage air gets very warm, the system will be inefficient. There will be a point at which the aircon unit can't get rid of its waste heat (somewhere around 45-50C) and it may stop working entirely, but the compressor will happily keep running, trying to shift the heat, not managing it, but still sucking money out of your wallet.
However, most garage doors allow lots of air leakage and garages are not usually insulated, allowing heat to be lost through walls and roof. Using a window aircon unit in a circumstance where the heat removed from the op can be reasonably well dissipated, can work pretty well. Window units are lots cheaper to buy than any sort of portable systems, too. Having the AC unit entirely within the garage will cut noise, too.