For photonic devices, structural disorder and light scattering have long been considered annoying and detrimental features that were best avoided or minimized. This review shows that disorder and complexity can be harnessed for photonic device applications. Compared to ordered systems, disordered systems provide much more possibilities and diverse optical responses. They have been used to create physical unclonable functions for secret key generation, and more recently for random projection, high-dimensional matrix multiplication, and reservoir computing. Incorporating structural disorder enables novel devices with unique functionalities as well as multi-functionality. A random system can function as an optical lens, a spectrometer, a polarimeter, and a radio frequency receiver. It is also employed for optical pulse measurement and full-field recovery. Multi-functional disordered photonic devices have been developed for hyperspectral imaging, spatial, and spectral polarimetry. In addition to passive devices, structural disorder has been incorporated to active devices. One prominent example is the random laser, which enables speckle-free imaging, super-resolution spectroscopy, broad tunability of high-power fiber laser, and suppression of lasing instabilities. Disordered devices have low fabrication costs, and their combination with advanced computational techniques may lead to a paradigm shift in photonics and optical engineering.