Is getting back to normal life difficult after PhD? As a PhD student, during the four years of research, you are your own boss. PhD students are not restricted to specific working hours (or place) – as long as they do the work it doesn’t matter when, how, or where they do it. 
I spend most of my time working at home or in coffee shops instead of my desk in uni, and I take a day off after long meetings...
I find that this freedom is what enabled me to be creative, come up with new ideas, start collaborations with others in my group, and publish papers. 

Now that I am almost done with my PhD, I am worried about life after PhD.
I am wondering if it would be difficult to get back to a normal job working a set amount of hours every day, in the same place. 
Is that why most people stay in academia after getting a PhD?
To answer your question, we have to clarify some misconceptions it seems to carry. First, a fixed routine is a staple in most jobs you'll come across. You're going to have to accept this. Even at Google, employees are given the freedom to take time off anytime they want -- but this time has limits, and it's on the promise that they'll return to work for a chunk of hours. The vast majority of jobs, no matter how flexible, will not be lax enough to let you work at a coffee shop in the long run.

The same goes for academia. As a professor or academic, you'll be required to teach, do some forms of public service, and, of course, do research. A lot of things from the first two will be fixed beyond your control in terms of task variation and scheduling. As for the rest, there's some freedom to allot time to tasks as you see fit, but given the amount of work you'll have to do, it will come to be structured in some way or another. 

Second, it's more accurate to say that a lot of people aren't staying in academia after their PhD. The market today is vastly different than it was twenty years ago. Academic jobs are harder to come by, and tenured positions are an endangered species. Most people will find themselves working as adjuncts or lecturers for a large chunk of their careers. And so PhD grads are now more commonly seeking employment outside academia -- industry, governments, NGOs, etc. 

Third, most importantly, no one chooses or should choose a job because of a free schedule. That's far too limiting. Choose a job whose tasks click with your interests, something that motivates you to work. Consider the reverse for your own background: if you hated research, I'm sure that no matter how many hours you were allowed to spend in a coffee shop, you wouldn't have enjoyed yourself or done well.