As for why the pee smells, apparently the exact reasons for why certain things make it smell isn’t a huge focus in the scientific community. Shocking, right?  However, the general idea is that metabolites (or things produced during metabolism) that come from things like coffee and asparagus have an unfortunate scent.  One of the culprits for asparagus is methanethiol.