In this case, there is actually supposed to be a ranged touch attack (though it will not be used in all circumstances). From the Archives of Nethys (
https://aonprd.com/SpellDisplay.aspx?ItemName=fireball), emphasis mine:
"A glowing, pea-sized bead streaks from the pointing digit and, unless it impacts upon a material body or solid barrier prior to attaining the prescribed range, blossoms into the fireball at that point. An early impact results in an early detonation. If you attempt to send the bead through a narrow passage, such as through an arrow slit,
you must “hit” the opening with a ranged touch attack, or else the bead strikes the barrier and detonates prematurely."
So the ranged attack roll is only for situations in which the "bead" is being shot through a narrow opening before detonating.