This could happen if both objects already have a material before being joined. Blender will copy all materials assigned in the source object to the destination object, all faces still assigned to the same material prior to joining. When you're creating a new texture, it's only assigned to one material, so it doesn't show up on faces still assigned to other materials when rendered.
The object's UV image could still be shown as you intended in the viewport, because it's assigned through
image attribute of the object's UV map. It doesn't rely on
Texture data at all. But what's rendered, do rely on it.
If this is the case, remove the unwanted material's slot, assign faces from the other object to the intended material, or assign the same texture to all materials in the object.