There is nothing wrong with mixing various intensities into rides. It will almost definitely make you a stronger rider. To me your ride sounds like the ideal training ride (if there was such a thing).
The downside comes when we spend the entire ride going too hard, or just way to easy (zone1). Different intensities actually cause different adaptation.
2+ hours is an ideal duration for endurance work (Z2/3), and unless you are a pro or elite rider, 10 minutes of work close to or at redline twice a week is plenty for most to help develop those specific anerobic energy pathways.
Some riders working on structured training plans would split the easy/hard days to maximize intensity on hard days, but even seasoned pro's, as they arrive closer to their target event would throw a workout like this together for a course that featured a tough climb at the end.
Unless your next paycheck is dependant on results, have fun with your riding. That is what is most likely to keep you riding, which ultimately is the real key to getting stronger on the bike.