Considering clotrimazole is the active ingredient killing the fungus.
Hydrocortisone is a steroid anti-inflammatory used by itself to treat dermatitis and other inflammatory symptoms.
The combined treatment gives symptom relief at the same time as treating the underlying cause; hydrocortisone alone would be ineffective at treating the infection, and clotrimazole alone does not resolve symptoms as quickly. There may also be some synergistic effects on treating the actual infection:
The addition of a corticosteroid to an antifungal agent at the initiation of treatment can attenuate the inflammatory symptoms of the infection and is thought to increase patient compliance, reduce the risk of bacterial superinfection and enhance the efficacy of the antifungal agent
(Schaller et al 2016)
Schaller, M., Friedrich, M., Papini, M., Pujol, R. M., & Veraldi, S. (2016). Topical antifungal‐corticosteroid combination therapy for the treatment of superficial mycoses: conclusions of an expert panel meeting. Mycoses, 59(6), 365-373.
Shankland, G. S., & Richardson, M. D. (1990). Comparative in-vivo activity of clotrimazole and a clotrimazole/hydrocortisone combination in the treatment of experimental dennatophytosis in guinea pigs. Journal of Antimicrobial Chemotherapy, 25(5), 825-830.