When hacking first started it was not thought of as that serious. The hackers were not even known as hackers but as practical jokers. The very first hack came in 1878 when the phone company, Bell Telephone, was started. A group of teenage boys, hired to run the switchboards, would disconnect or misdirect calls.
The first authentic computer hackers came in the 1960s. During those times, computers were mainframes, locked away in temperature controlled, glassed in areas. It cost a lot of money to run these machines, so programmers had limited access to them. The smarter students, usually MIT students, had an insatiable curiosity about how things worked. So, the smartest ones created what they called "hacks", programming shortcuts, to complete computing tasks more quickly. In some cases the shortcuts were better than the original program. One of the hacks that was created in the 60s, 1969 to be exact, was created to act as an open set of rules to run machines on the computer frontier. It was created by two employees from the Bell Lab's think tank. The two employees were Dennis Ritchie and Ken Thompson and the "hack" was called UNIX.