Sometimes it makes much more sense to shoot on location for instance if you needed a field you could just go to a field and shoot there. Location can also add more of a narrative to the images, it can also make them seem more realistic.
The main problems of shooting on location are things such as weather and having no mains supply you need to be organised and fully prepared when shooting on location and bare in mind travel and equipment.
The studio is particularly useful for fashion photography, you have total control over the lighting and you dont have to worry about the weather. you also have a range of backgrounds readily available in the studio and basic or elaborate sets can be built to add more of a narrative to the images.
of course there are potential problems such as technical issues or health and safety but in general it is quite easy to control your images in a studio setting.