The starter solenoid is also the tapping off point for the bikes electrics before the engine starts. If it goes high resistance internally, the relay action could still be OK so turning the motor over, but the feed to the fused circuits is compromised and as the starter requires a lot of amperage, leaving nothing left for the ignition. As the power needed to crank will differ almost every time you start, depending on temp, weather etc, the effect will also be different. The ECU won't detect a fault as on initial ignition on test everything is OK.
Once the engine is running the alternator