There used to be a bit more demand. Hawaiian committed to 6 orders plus 6 options, and Transasia also ordered 4, coming to 16. Unfortunately, Transasia ceased operations and canceled their orders, and Hawaiian hasn't exercised any of their options yet. That leaves the -800neo at only 6 planes on order.
Update: Hawaiian Airlines announced they would cancel their orders for the A330-800neo and instead opt for the 787-9, signing a letter of intent to order 10 with purchase rights for 10 more.
Airbus was probably hoping for more orders and continuing development of the -800neo somewhat "at risk". Of the 1368 currently delivered A330ceo, 615 of them are the -200. This would suggest there may eventually be demand to replace those with the -800neo. Almost all of the A330 fleet is less than 20 years old at this point. There's still time for more orders as the A330neo only recently made its first flight.
As the first -800neo has now been built, most of the overhead in developing it has already been spent. There will of course be more as it must also be flight tested and certified, but evidently Airbus still sees value in going through with that. It will be a balance between Airbus recouping costs of development or avoiding costs of further development and support, and the needs of the customer.
Airbus probably also sees value in keeping Hawaiian happy. Hawaiian has not ordered any -900neos and they currently have 24 -200s in their fleet, suggesting that even if no other -200 operator orders the -800neo, Hawaiian might order more. Airbus may prefer that Hawaiian takes the only 6 -800neos they ever build than for them to go and order the 787 instead.
The 737-7 MAX is in a very similar situation. Boeing only has 58 orders for the type, which is 1.4% of the total orders for the MAX (the 6 -800neos account for 2.7% of the total A330neo orders). To compound this, the launch customer, Southwest, recently announced that they're delaying 23 of their 30 orders, possibly to covert them to a different version. Yet Boeing recently rolled out the first -7 and seems to plan on going ahead with it.
Since these planes have already been built, the manufacturers probably see some value in keeping the orders around so they can still sell the planes, and avoid the bad PR of going through the trouble to develop, sell, and build the plane only to cancel it. It remains to be seen if the airlines will continue to see value in taking delivery of types that no one seems to want.