Scientists have finally solved the mystery behind one of the oddest dinosaurs ever to roam the Earth.