Short version: Is there some way to tell ArcPy functions running in Pro (command prompt or Notebook) whether or not to add the output as layers on a map? For example, ModelBuilder has an "Add to Display" variable to control whether a step's output is added to a map. Is there some equivalent in ArcPy?
Many Python ArcPy functions running in the Python prompt or a Pro Notebook will add the output to your active map. That's either super handy or super annoying, depending on whether you want the function's output on your map. Sometimes I'm just working with data in an FGDB that has nothing to do with a map (e.g.: arcpy.management.AlterField) and layers start appearing on the map. Other times, I am interacting with a map, but my code has a bunch of intermediate steps that don't need to be on the map. Also, my code runs a LOT faster when it's not adding layers to the map.
If I close all my maps and run the code, this doesn't happen. After re-opening one or more maps, it may not start doing this again. So clearly I don't understand the how or the why about ArcPy adding layers to maps. I know how to programmatically add and remove the layers from the map, so I can solve this, but I'd rather be able to control whether they were added (or not) in the first place.