What is point of encrypting wallet, if Bitcoin API's sendtoaddress needs passphrase?
The wallet passphrase is there to protect the wallet file on disk. It is not an authentication mechanism or a security measure against anyone who can see what is sent to it. It does however prevent private keys from hitting disk in readable form.