Why do some sets contain parts of an unrelated colour that are hidden on the final model?
I believe the main reason is so that the pieces are easy to identify in the instructions - as many LEGO sets don't have the Technic style "List of elements used in this step" it's always a fun game of "Spot the difference" to see what's changed:



If those pieces were all red, then the target audience (5+ on those sets for example) might find it very frustrating to build.

(Even with the list of elements to use in a step it can often be quite an effort to find where a particular part goes.)