It would be very handy at times to be able to use conditional or other programming logic when creating custom popups in ArcGIS Online.
For example, some features may have hyperlinks and others don't. If there is a hyperlink, display it in the popup, but if the field that is used to create the hyperlink is null, then don't display it. Another example might be changing some of the text color depending on the value of an attribute, to indicate a feature's status.
There are certainly many other examples where an enhancement like this could be used.