Yes it does matter. If a piece of software does what it is programmed to do, in the direct sense, then it is not AI. If it can learn to respond or act in a manner that is not directly programed to do, then you are seeing whiffs of AI.
Using these goalposts even real intelligence, nevermind AI, would never meet the standard - if it has been directly programmed to learn new responses, ilke humans for example, then you would still fail it as intelligence using this criteria.
How about if what you directly programmed it to do was to write code to handle unexpected situations/inputs/etc? Perhaps in an iterative fashion, using previously gathered data? Using code fragments that are reassembled in new combinations, testing each mutation for success against the inputs? Because AIUI this is what the majority of chatbots *currently* do - use previously acquired data to refine their outputs.