SetWit was first introduced by a developer named Pieter Wiulle at the Scaling Bitcoin conference in 2015. In his presentation, Wiulle said that by implementing a new protocol to bitcoin's core code that removes certain data normally recorded on its blockchain and storing that data outside the block, he could fix a bug in bitcoin's code called "transaction malleability," which is a bug that allows anyone to change small details that modify the details of the identifying addresses relevant to a transaction - in other words, the data that tells you who sent bitcoin to whom - as well as its subsequent hash. Others praised this proposed protocol upgrade as a potential solution to bitcoin's relatively poor scalability; by implementing this upgrade, bitcoin would be able to process more transactions per second, because less data would be required in order to record a transaction in a given block, enabling the protocol to process more transactions per second. This was dubbed "segregated witness," because the signature data had previously been named the "witness."
Another benefit of SegWit is that it is, from a programming standpoint, surprisingly flexible; SegWit supports the implementation "second layer" protocols, which means the protocol tends to operate smoothly with protocols built "on top" of a blockchain, such as the Lightning Network. In August 2017, SegWit was enacted to the bitcoin blockchain. Because of how the protocol was designed, it was implemented without causing a hard fork.