Not even remotely similar. Goats (and cows) need to be pregnant to produce milk, which is why you inevitably end up with offspring as a by-product of milk production. Hens lay eggs regardless of whether a rooster is present, so if you get some rescue hens you can enjoy your eggs guilt-free.
Sure, but that's not the point I was making. Male goats are useless to a goat cheese farmer. Roosters are similarly ~useless to egg farmers. When chicks destined to become egg-laying hens are born, what happens to their brothers?