The area of Delaware was originally claimed by the Dutch, but the first Dutch settlements were in the New York City area, so Delaware remained unsettled by Europeans until the Swedes showed up there in 1638. The Dutch didn't have the resources in North America nor the inclination to do anything about the small Swedish fort in the Delaware Bay at first. It wasn't until 1655 that the Dutch were able to reclaim the land, when the Director-General of the New Netherland colony, Peter Stuyvesant, led a force down to the Delaware Bay to invade. The Swedes surrendered without a fight and agreed to abide by the authority of Stuyvesant and the Dutch.
Nine years later, in 1664, the English took over the New Netherland colony from the Dutch which included Delaware. New Netherland was renamed New York and split into two, with part of it becoming New Jersey. Delaware actually remained part of New York, but all the ex-Dutch areas remained under shaky English control. The Dutch were able to invade and retake control of the area in 1673-74.
The English got control back with the treaty that ended the Third Anglo-Dutch War and the Dutch never again administered any of mainland North America. But for many decades after, Delaware remained a cultural mishmash of English, Dutch, and Swedish descendants, with their respective Anglican/Episcopalian, Dutch Reformed, and Swedish Lutheran church communities.
When the English retook control of New York/New Jersey/Delaware at the end of 1674, another re-org ensued and the English government made Delaware a part of Maryland for a short while. But then the colony of Pennsylvania was chartered in 1681, and William Penn lobbied successfully to have Delaware transferred to Pennsylvania to give the new colony access to the sea.
But the locals didn't like this (and hadn't really liked the Maryland takeover, either), so they refused to send representation to the Pennsylvania legislature and formed a local legislature of their own to manage their own affairs. In the end, a compromise was reached where Delaware was allowed to keep their own local legislature, but legally, that legislature still came under the authority of the Pennsylvania legislature and governor.
That remained the legal situation for almost a hundred years. In 1774, the First Continental Congress was held in Philadelphia, and included delegates from both Pennsylvania legislatures--the one in Philadelphia and the one in Delaware. This was repeated during the Second Continental Congress, and as that Congress's actions began leading toward the Declaration of Independence, the Delaware legislature drew up their own state constitution and declared themselves an independent state from Pennsylvania. Pennsylvania honored the split and ultimately Delaware was admitted to the United States under its own authority.
Delaware wasn't alone in doing this. Some months after the Declaration of Independence was signed, an area of northern New York whose population was mostly anti-slavery declared itself independent from New York in part to abolish slavery in the area. (There were other issues, but that was one of the primary issues.) This area became the independent state of Vermont, which would eventually be admitted to the United States as its own independent state.
EDIT: TL;DR: Because when the Pennsylvania colony was chartered, William Penn successfully lobbied to take Delaware away from Maryland and make it part of Pennsylvania to give the new colony direct access to the sea. But the people of the Delaware area were resistant and formed their own legislature as a quasi-separate government. They then split away from Pennsylvania entirely in the early days of the Revolutionary War.