During the 16-bit era, it was almost an unwritten rule that you had to have a boss at the end of every level. It was just the formula at the time, especially in an era dominated by side-scrollers.