The 'small connector' is a check valve (one-way valve) used to maintain the vacuum in the brake booster, so yes it is necessary.
The 'wire' is the tacho cable and needs to remain straight with no kinks in it.
That doesn't mean you can't secure it as shown in the picture, but it must remain straight or your tacho won't work properly.
Bob Smith (Brisbane,Australia)
RHD,1967 early 250 SL, auto