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.