The reason for this behavior is that Blizzard updates the status texts when CVAR_UPDATE fires. This event does not (always?) fire when using SetCVar, unless you provide a third argument, typically your addon name. You could skip the
Code:
InterfaceOptionsStatusTextPanelDisplayDropDownButton:Click();
DropDownList1Button2:Click();
part and just use SetCVar calls instead:
Code:
SetCVar("statusTextDisplay", "whatever_value_you_need", "HP")
This will trigger TextStatusBar_OnEvent which will call TextStatusBar_UpdateTextString, which will call TextStatusBar_UpdateTextStringWithValues, which will trigger your hook and alter the display.