For me it depends on the purpose of my visit. For
Disneyland California, my Disney time is part of a longer visit to the LA / California area. Im in the parks open to close, the main focus is time in the park so near location and low price are my priorities. For Disneyland California I just need bed, shower and somewhere to store my stuff.
For Disneyland Paris, I am specifically travelling just to go to the parks. Staying at a Disney onsite hotel is part of the experience. When I go to Disneyland Paris, it is not part of a longer trip to the Paris area. Price is still an issue but basically I can get 4 days at Disneyland Paris onsite for the same price as 2 days offsite at Disneyland California.
For some trips, the hotel amenities is the big factor---an lovely outdoor pool space and direct access to the beach plus use of lounge chairs and umbrellas on the beach was a big draw for the hotel we booked last weekend (that was in San Jaun--don't know yet if we'll get to take that trip or not)