The Technic parts are there because this set belongs to the modular wall system of the old days.
Wow... I've had that castle for years and had no idea it was meant to be a modular like that.
I have to admit, the King's Castle modular is much better than this one - I think I prefer this particular castle by itself (no additions).
I was just putting together the King's Mountain Fortress last night and found the same Technic part - this one sticking out in a random place on the outside edge of the ramp.
When I was done, it just sat there on the outside of the ramp, the peg sticking out with no apparent use. Any idea what that might be for?