What examples highlight the distinction between 产生 and 生产, both meaning "to produce"?
生产 refers to human kind activities; i.e. to produce / manufacture / make / create (as the effect of human subject will).

产生 refers to natural activities; i.e. generate / come into being (as the effect of some kind process).

As a side note 生产 could mean parturition too.

As the examples you've showed,


  病毒是怎样产生的?
  导体中就会产生电流


Both 产生 are used for the context not containing subjective initiative, especially the intent of to make / create.


  操作人员对自己生产的产品要做到自检


生产 is used for the intent of human kind activities, i.e. manufactured by the operator.


  巧克力可用于生产时增加体力，红糖是产后补血之用


生产 means parturition here.