If you, as an employee, work on some side-projects during work hours and also manage to do your work-related stuff then this is, in my opinion, just personal and professional development, it's like doing a course on pluralsight, it helps you by offering you new challenges. On the other side, if you drop work-stuff in order to work on side-stuff then this might end up as a problem.
So, I think that yes, a company should allow its developers to work on what they want as long as their work-related progress is on track. e.g.: pluralsight, courses, side-projects, open-source.