I've been told by attorneys that applying for the Green Card lottery does not come without risk--in fact it can prevent you from obtaining a non-immigrant visa.
For example, when applying for an F or J visa (student/post-doc, say) the consular officer will ask you if you have intent to emigrate. The only allowed answer is a firm "No and I have permanent connections to my home country."
If you've applied for the green card lottery in the past, the consular officer could interpret this as having intent to emigrate and then deny you on any other non dual-intent visas.
IANAL, so take it with a grain of salt. This is a super conservative interpretation though. Anecdotally, I myself have received an F-1 visa despite having applied for diversity lottery (unsuccessfully). If I recall correctly, I may have at some point seen an explicit guidance on the DoS website to the effect that a mere DV lottery application (without a successful followup petition) is not necessarily indicative of immigrant intent for non-immigrant visa application purposes. I cannot find it though, the page seems to be 404ing.
For example, when applying for an F or J visa (student/post-doc, say) the consular officer will ask you if you have intent to emigrate. The only allowed answer is a firm "No and I have permanent connections to my home country."
If you've applied for the green card lottery in the past, the consular officer could interpret this as having intent to emigrate and then deny you on any other non dual-intent visas.