A lot of foods are typically classed as being “unhealthy” on many diets, such as burgers and pizzas. However, when you actually break these foods down into their constituent parts, you will see they may not actually be as bad as you think. For example, a cheese burger is just beef mince, a roll, a bit of cheese, tomato and lettuce. If you were to make this from scratch using a leaner version of mince and a seeded/wholemeal roll then it could actually be a decent choice.
A lot of the time it comes down to the cooking method/ingredient quality rather than the contents as a whole.