Regression model to predict probability of rare event
The output of logistic regression is exactly that - the probability of an event happening. If your covariates are informative then your model will do better than just saying "P=1000/900000" everytime, because it might say "P=10000/900000" for a positive event, or even "P=0.9" of a positive event given certain covariates.

If there's no predictive power in the covariates (ie they don't correlate with the positive events) then yes, the model will say P=1000/900000 but that's the way it is.

If you want a binary outcome then you have to decide what threshold of P you choose, based on your fear of false positives/negatives or value of true positives/true negatives. For example, if one false positive means people die, you set your threshold such that you don't get false positives. These thresholds are generally not statistical decisions but based on application logic. ROC curves can help here.