Trying to select objects by name with script, don't understand this behavior
The script is setting the location of whatever object is active when the script is run.

bpy.ops.object.select_pattern(pattern="my_Cube")


assigns to the  context selected objects list.  This is the list of all objects in the scene whose select property is true (obj.select).  Using "my_" as a search string for the op would select all your "my_" objects.  The operator setting one as active is somewhat meaningless. Use

monkey = bpy.context.selected_objects[0]


to assign the first of the selected objects list,  after running that operator.  

The context active object,  is best set using

scene.objects.active = obj


after running an operator that sets active object.

Suggest replacing all the annoying operators  with API calls something akin to:

import bpy

context = bpy.context
scene = context.scene

for name in ["Cube", "Cone", "Lamp", "Suzanne"]: # not a my_ fan 8^)
    obj = scene.objects.get(name)
    if obj:
        obj.location = (5, 5, 5)