Switching between idle and turbo boost speeds is exactly what this CPU is supposed to do. It's probably not every 5 seconds, it will be much faster than that - your impression is probably created by the sampling rate of the monitoring software. The CPU is designed to clock up virtually instantly when there's a high demand on CPU resources.
You are right to ask the question - at least you would be if your CPU transistors were made of metal rather than silicon. When your CPU clocks up, it will also volt up, which results in a change in temperature. Rapid and frequent changes in temperature result in frequent expansion and contraction. If your CPU transistors were metallic, over time this would cause metal fatigue and eventually, a "dry joint" (the metal breaks and can no longer make a circuit). This is why some people advise leaving hifi equipment switched on all the time (although with modern, high quality materials it shouldn't make much difference).
This is not a problem for your CPU because it's made of silicon. Silicon is very rigid (meaning that it expands and contracts very little when its temperature changes), and it doesn't suffer from metal fatigue.
Leave your settings as they are. You could leave it at a constant clockspeed but this would significantly increase your system's power consumption at idle.