"My dog needs the bathroom." Why was this marked wrong?
I don't really get this sentence. Is it that the dog yearns for the bathroom because it's a place he hasn't been in a long time. Like the dog yearns to go to the park. Or the dog yearns for the food on the table.
Or is the intention of the sentence that the dog needs to pee or poo?
No. Both can be used in both cases. Mostly use you would ל for everything, not because it's more correct, but because אל has fallen out of favor. However, there are a few special cases where only אל is correct. I can only think of the pronouns: מתגעגע אליך, מתגעגע אליו.
Side note: As far as I know, it is also correct to use מתגעגע על־, but have never seen this used in real Hebrew, either in writing or in speech.
This sentence reads very strangely in English. I think the English translation should be something like 'My dog needs to go to/use the toilet' (in Australian English, at least; Americans would probably say 'the bathroom). Otherwise this really makes no sense in English. Is it the case that can actually mean 'needs to go to/use the toilet/bathroom' or did Duo intend this to just be a funny example of 'misses'? Or maybe it means that the dog aimed wrongly and 'missed', which is another valid meaning of 'missed' in English? I do think this is a confusing example.