On the command line, is_ssl() returns false because the corresponding $_SERVER['https'] variable isn't.
While technically this is correct, it can lead to misleading behavior within WP-CLI. For instance:
$ wp option get siteurl
https://example.com
$ wp site list --field=url
http://example.com
I don't have an opinion for an immediate solution on this; more so, flagging behavior for visibility.
From https://wordpress.slack.com/archives/C02RP4T41/p1508444879000316