Why is beamforming needed in 5G?
One reason is that higher frequencies are envisioned. With higher frequencies, the path loss grows (cf. Friis equation). Also, the wavelength is reduced and thus, $\lambda/2$ radiators start becoming quite small. The power you can radiate from a small aperture is limited as well so overall our power budget suffers. The only way out is directivity (cf. Friis equation again): we need to make sure our energy is directed towards the users of interest. This is possible by employing large antenna arrays (i.e., arrays comprised of a large number of elements). If each element radiates a certain power, $N$ elements can add up coherently to the $N$-fold power, provided we send it in the right direction. This is what beamforming does.
Another reason is that beamforming allows us to spatially separate users so that communication links can share the same time and frequency resources and be separated only spatially. In theory, an $N$-element antenna array can serve $N$ data streams at the same time and frequency, either to one user (that receives $N$ spatially multiplexed data streams, as it is common in WiFi) or to $N$ users (that each receive one). This increases network capacity even more.
Both factors play well together: higher frequencies and smaller wavelengths lead to a more rapid decorrelation of the channel in space so that even relatively closely spaced users can still be spatially multiplexed. Think of very narrow &quot;pencil&quot; beams, each pointed to a different receiver (if we are serving their lines of sight) or path (if we are using multipath).
While this sounds good, it also poses significant challenges. If we only slightly depoint the beam, the signal may be lost entirely. For moving users, this can be quite a challenge. Initial acquisition becomes harder too because signals transmitted/received omnidirectionally might be too faint to detect.