Some drug molecules are found by random chance, with someone noticing something that isn’t quite right and investigating further. Most famously, penicillin was discovered by Alexander Fleming after he returned from a holiday to find a fungus growing in a petri dish. The penicillium mould had killed the surrounding bacteria, and this was later developed into the antibiotic penicillin by Florey and Chain.
Unexpected discoveries can exploit different biological pathways that may not be fully understood, or use an unexpected target. This can result in novel drugs being produced that have a significant improvement on patient’s quality of life.
Design methods can be applied to an unexpected molecule, improving its ADME characteristics. This has been used with penicillin, producing fourth-generation drugs in attempts to reduce resistance to it.