Currently users of the kernel must convert a script to bytes to interpret the OP codes, which can lead to errors. For instance, when scanning for silent payments, it is useful to filter transactions that do not have any P2TR outputs. Querying if a script is P2TR is non-trivial, as OP_1 = 0x51. This function removes the potential misinterpretation of script bytes.
There are other similar methods for script, but I have omitted them as this is the only method that has a demonstrated use-case that I am aware of.