Togepi: You get a Togepi from an egg in some games, and they want you to treat it like a starter (If you want to use it). Starters are mostly male so that you can't breed more of it until you can find Ditto in the wild (the female reproduces the same species as themselves in breeding, unless you breed a male with a Ditto), by which point the Togepi evloution you have used is so much higher levelled than one that would come from an egg, you might as well keep on using the original one (like with the starters, they want you to have a long-lasting friendship with your Togepi, until the post-game where you can be bothered to breed and have access to Ditto).
Litleo: Packs of Lions in real life have one alpha male and more females that go out and do the hunting. Also, the male variant of Pyroar looks cooler, so they want to make it harder to get.
Growlithe: Growlithe was exclusive to Pokemon red, and Vulpix was exclusive to Pokemon blue. Growlithe's gender ratio is 75% male, 25% female. Vulpix's gender ratio is 25% male, 75% female. Growlithe's gender ratio makes it a counterpart with vulpix. Also, they're both fire types and they are both based off of canines (Vulpix being a fox) and they both evolve using the fire stone. I think the genders also mean that Arcanine represents masculinity and Ninetales represents Feminininity.
Machoke, Mawile, Aromatisse and Gothitelle: Just because they have a more masculine or femenine design doesn't mean that they should be only/more likely to be male/female. You might consider sharks in real life as more masculine animals, but they can be male or female. Even though these Pokemon you mentioned are more human-like, they are still supposed to be wild animals that look like that naturally.
Chandelure, Aegislash, Klefki, Bastiodon, Weezing, Muk, Garbodor and Cofagrigus: Even though these all look like un-natural things (Apart from Bastiodon, which is based off of a Zuniceratops (Dinosaur)), they are all forms of life somehow, so it would make a lot of sense if they could breed. Maybe they developed the things they need to have to be a gender naturally over time. They must have developed eyes somehow from just being a sword, or a rubbish bag, or some sludge, so maybe in a simillar way they also magically became male or female.
But then there are Pokemon like Carbink or Magnemite that are like the ones just mentioned, but don't have a gender. Without my analogy about how some of these sorts of Pokemon can have genders, cases like Magnemite make more sense. But with my analogy, they make less sense. Well, maybe Magnemite haven't developed genders yet and are still evolving naturally (not like evolving into a Magneton, but more like how real life animals evolve). And maybe the fact that a Magneton is just three Magnemite has something to do with it. Maybe.
Diancie: A Diancie is supposed to be a Carbink that underwent a mutation that turned it into a Diancie. And Carbink is genderless.
Meloetta: Even though some legendary Pokemon have genders, I think Meloetta isn't deserving of one. I see it like this: Some Pokemon come about naturally, and become legendary, for example, Heatran (can be male or female). So when they are legendaries, they still have their gender, from when they weren't legendary and when they could breed, left over. But some legendaries are just beings created by Arceus made to do their job (whatever Meloetta's job is. There are better examples, like Dialga, etc.) so they were never non-legendaries, so they don't have any gender left over. Even though Meloetta looks more femenine, let's just say it was created by Arceus instead of evolving (real evolution) like how all other Pokemon came to exist.
Corsola and Snubbull: Then you get to the ones that are mostly female because they look more femenine. I know it doesn't fit with the explanations I have already given, but sometimes there are weird cases where Pokemon do have uneven gender ratios because of their appearance. Snubbull is mostly female (it's 25% female and 75% male, not the other way around like you said in your question) probably because it evolves into Granbull, which has part of its name derrived from the word 'Grandma'. Corsola is pink, which could make it more likely to be female. But what is more likely the case is something like how Litleo are mostly female because that's how packs of lions work. We don't have any real world examples of Snubbull or Corsola (I know bulls exist, but Snubbull are weird and different. And coral exists, but it's not animals like Corsola), so we have no way of knowing if they live in packs of mostly females.
I hope that helped!
Sources: experience, things from the pokedex (and bulbapedia for the design of Bastiodon).